More unit testing (62% coverage); Minor fixes