Improve test coverage

Fixes a few gremlins and gets code coverage to 100% ready for further work/refactoring