Small refactoring and adds coverage tool