More test coverage, linting fixes