The mayor and council shall have the right to require all persons desiring to make improvements upon real estate to submit detailed information and make application for permit. It shall have the right to supervise and inspect all such improvements. It shall have the right to adopt a reasonable building code and shall have the power to enforce the same. Said municipality shall take all reasonable precautions to the end that life, limb and property of its citizens and of the public generally are protected before permitting any such work or improvements to proceed. It shall have authority to adopt all reasonable by-laws, ordinances and resolutions in furtherance of the general powers here enumerated.