Split out the report generation into its own file.