Grouper integration

Note that some refactoring is included which is not specifically related to the new feature.  Some of this was incidental and some helped to more cleanly separate the new feature from existing code.