Added comments to controller. Exception handling for invalid authority