Updated variable references in templates;