Code cleaning and adding style