Refactoring for readability