Refactor existing code for better testability.
Refactor existing code for better testability.