The city may, except as expressly limited by the Iowa Constitution, and if not inconsistent with the laws of the Iowa General Assembly, exercise any power and perform any function it deems appropriate to protect and preserve the rights, privileges and property of the city and of its residents, and preserve and improve the peace, safety, health, welfare, comfort and convenience of its residents and each and every provision of this code of ordinances shall be deemed to be in the exercise of the foregoing powers and the performance of the foregoing functions.