clean up family groups code