proper scoping for template var
Merge pull request #95 from jlambert121/var_scope

proper scoping for template var