Improve code coverage and some code hygeine (ha ha!)