Fixed bugs in Group handling code. Cleanups and extensions to the Users handling code