Added a permissions handler and datastruct.