The purpose of this Code is for regulating and restricting the height, number of stories and size of buildings and other structures, their construction, alteration, extension, repair, maintenance, replacement or removal, their density of occupancy, all facilities in or about them, their location and use, the use of them or of land for trade, industry, residence or other purposes, the percentage of lot they may occupy and the size of yards, courts and other open spaces, the establishment, maintenance or setting back of building lines upon the streets, protection and thereof; for establishing classes of buildings, other structures and land for such purposes; for defining certain terms used herein; and for providing for administration and amendment and for the Zoning Hearing Board and for the imposition of penalties for violations thereof.