Added some more report generation stuff.
minor bug fix and finsihed generating report