Added a module to handle reporting.

Also moved permission fetching to this new module.