Added closure capability to twig