Your landlord must keep your apartment maintained in a condition that is not hazardous to your health and does not place you at risk of injury. This includes following building codes during construction, replacing loose floorboards or worn flooring materials, providing your residence with locks on doors and windows, providing parking lot security in areas known to have a high crime rate, and other actions designed to protect your wellbeing.