Refactoring, formatting