Updated parameter name convention. Inserted context variables in templates.