It authorizes such ordinances as shall seem necessary and proper to provide for the health and safety, promote the prosperity, improve the morals, peace, good order, comfort, and convenience of the municipality and the inhabitants thereof, and for the protection of property therein.'