Implemented quality factors and did a lot on the report

See inline comments :-)