Groups

I think this is ready to include: take a final look over and if you agree let's merge it in!