Implemented the final things for adding groups on the fly.
Fixes #88