Update to template variable handler