Psi reports

For PSI custom reports.

For convenience I just stuck all the psi-specific code in one file. Let me know if this matters enough to be changed.