Some code cleaning