Groupings now clean up after themselfs.
Fixed bug in adding groupings to groupings.
More cleanup on grouping deletion.
Merge branch 'test' into dev