Update groups.c

Added comments, and an example/test for duplicating a comm.