general code cleaning