Fixed unit tests and linting issues