Split out group access and revision logic.
Some cleanups here and there.