Style fixes, increasing unit test coverage