Formatting, imports, small refactoring