Code Coverage and some refactoring to aid with that