Tiny refactoring and code formatting