AMD wrapper updated to return a template name from a definition function