Added constructor for closure.