CLeaned some code