Initial code cleaning