Refactored permissions.
Got create agent working.