Ported GROUPCommand to template system.