Added more validation for manipulating policies on null/empty roles. (oops!)

Also reorganized things a bit.