Code Climate test coverage and more code fixes.