The city commission may enact any and all ordinances, rules and regulations necessary to lay out a fire district in the city and may enlarge, change or modify such fire district; may prescribe how and of what materials buildings within the fire district may be erected, how thick the walls shall be; the manner in which chimneys, flues and stovepipes shall be constructed; and may make such reasonable rules, regulations and requirements as it may deem necessary to so far as possible protect the city from danger from fire; and may prevent conflagrations. The city commission may also order changes in the construction or arrangements of chimneys, stovepipes or flues, or the removal thereof when, in the judgment of the city commission, they are dangerous or likely to be so, or to compel the owner or occupant to make the changes or alterations ordered, by proper ordinance, and collect any expenses incurred by the city, under any ordinance passed carrying out the powers granted under this section by execution as in the case of collecting other costs due the city.