Best thing you can do is document the hell out of the condition before your stay. Do a meticulous property inventory of all wear/damage, and get the landlord to sign it. If they won't, send them a copy anyway. Also take photos of everything: walls, carpets, bathroom, shower, inside of closets, inside fridge, cabinets, inside oven, everything. Especially anything that was damaged/dirty, but include all the areas that look fine as well. Turn on all the lights while you're doing it, so you get good detail in the photos. Make sure you save them somewhere they won't get lost (Dropbox, iCloud, etc work well).
When you move out, take more photos of everything. Try to do a walkthrough with the landlord. If they charge you for something you can look at all the photos and either see if they're right, or have evidence to prove them wrong. If you send them that legalese letter, attach the before & after property inventory, and before & after photos. This will make it much harder for them to argue against you.
Also, make sure that you really, truly did clean the place and not damage it. I have been on the other side of this a few times, and several former tenants made a lot of noise about how everything was 100% clean and I'm just ripping them off. So I send them the photos of the crap in the fridge, the gunk stuck inside the cabinets, the filthy shower, the scratches in the flooring, and that's usually the end of it. I'm not saying that's you, I've never seen your apartment, but sometimes in the bustle of moving out people are not as detail oriented as they think they are.