Linting, further refactoring