Refactored code with improved test coverage.
Refactored code with improved test coverage.