clear default group options when trying to delete
reorg and fix bugs caught along the way