Slight improvements to the closure creation