Clean up and fix linting errors