Refactoring after running code coverage on Scala code.