Under the Massachusetts Sanitary Code, the landlord must provide the rental premises to the tenant in a clean, safe and habitable condition. The tenant has the right to report violations of the Code to the local board of health, and may be able to pay a lower rent or even move out if the landlord fails to address the problem.
The landlord cannot ask for a security deposit which totals more than one month's rent. The deposit must be placed in an interest bearing account and the interest must be paid to the tenant on a yearly basis or, as an alternative, the tenant may deduct the amount of the interest from a rent payment.
The landlord is entitled to ask for the first and last month's rent before the tenant moves in. The landlord can also require the tenant to pay for the cost of changing the locks.