linting and minor fixes