Refactoring for better coverage.