Code cleaning

Some code cleaning and consistency