Comments, remove unused code, simplify some  areas