Huge refactoring with linting that works better