Pt.2 of code cleaning