Refactoring closure composition