Most problems fixed. Now report generation