Move permissions to API, and move a hook into install file.