renamed groups to roles. added real groups. lots of fixes and cleanups