Work on gesture groups, fix a few bugs