Improved logging.
Improved permissions.
Added PermissionManager.