Added more tests, improved code coverage