Improves #6: Refactored a closure.