Replaced groupings with templates.