Lot of code cleaning