Refactoring for maintainability.