Refactor/fix linting errors