Revised with tests.  Checks for no operations, and defaults group to false.