Formatting code
More refactoring