Last few unit tests and linter fixes