Added automatic adding and reseting of templates.