Consolidate template variable handling
Add TemplateHelper tests for variable handling
*twitch* one space too many