CodeCoverage Refactoring for performance