(a) A landlord shall:
(1) comply with the requirements of applicable building and housing codes materially affecting health and safety;
(2) make all repairs and do whatever is necessary to put and keep the premises in a habitable condition;
(3) keep all common areas of the premises in a clean and safe condition;
(4) maintain in good and safe working order and condition all electrical, plumbing, sanitary, heating, ventilating, air-conditioning, and other facilities and appliances, including elevators, supplied or required to be supplied by the landlord;
(5) provide and maintain appropriate receptacles and conveniences for the removal of garbage, rubbish, and other waste incidental to the occupancy of the dwelling unit and arrange for their removal; and
(6) supply running water and reasonable amounts of hot water at all times and reasonable heat except where the building that includes the dwelling unit is not required by law to be equipped for that purpose, or the dwelling unit is so constructed that heat or hot water is generated by an installation within the exclusive control of the tenant and supplied by a direct public utility connection.
(b) If the duty imposed by subdivision (1) of subsection (a) is greater than any duty imposed by any other subdivision of that subsection, the landlord's duty shall be determined by reference to subdivision (1) of subsection (a).
(c) The landlord and tenant of a single family residence may agree in writing that the tenant perform the landlord's duties specified in subdivisions (5) and (6) of subsection (a) and also specified repairs, maintenance tasks, alterations, and remodeling.
(d) The landlord and tenant of any dwelling unit other than a single family residence may agree that the tenant is to perform specified repairs, maintenance tasks, alterations, or remodeling only if:
(1) the agreement of the parties is set forth in a separate writing signed by the parties and supported by adequate consideration;
(2) the work is not necessary to cure noncompliance with subdivision (1) of subsection (a); and
(3) the agreement does not diminish or affect the obligation of the landlord to other tenants in the premises.
(e) The landlord may not treat performance of the separate agreement described in subsection (d) as a condition to any obligation or performance of any rental agreement.
(f) Rights of the tenant under this section do not arise if the condition was caused by the willful or negligent act or omission of the tenant, a member of the tenant's family, a licensee, or other person on the premises with the tenant's consent.