Added more tests and code coverage