Added template variables and tests