Refactoring & Testing with coverage code