Updated code structure

formatted the code structure to get align code and to get rid of extra
empty lines