Group work

- Added group base class to remove some duplicate code.
- Added add to group command
- Added remove from group command.
- Fixed bug where descendant selected flag wasn't being updated.