Refactor of the closure.