Move report generation into its own script/class