Made the code pretty

refactoring code to a single style