Revamped loading of templates.