cpp code cleaning