Simplified modelExpandTemplates.
Renamed modelExpandTemplates to expandModelTemplates.