It is construed to secure the beneficial interest and purposes thereof which are public safety, health and general welfare through structural strength, stability, sanitation, adequate light, ventilation, and safety to life and property from fire and other hazards.