All buildings and structures, and electrical, gas, mechanical or plumbing systems which are unsafe, unsanitary, or do not provide adequate egress, or which constitute a fire hazard, or are otherwise dangerous to human life, or which constitute a hazard to safety or health, are considered unsafe, and are hereby declared illegal. They shall be abated by repair and rehabilitation or by demolition in accordance with the provisions of the technical codes adopted in this chapter.