Refactoring serializable closure.