Refactoring maintenance tasks