Jay	Refactored the report generation code.