Refactoring for more responsiveness