Make initialization of closures more efficient