Cities of the first class, cities of the second class, and incorporated towns may order the removal or razing of, or remove or raze, buildings or houses that in the opinion of the city council or town council have become dilapidated, unsightly, unsafe, unsanitary, obnoxious, or detrimental to the public welfare and shall provide by ordinance the manner of removing and making these removals.