Cleaned Code. Changed the references to mongo collection to be like the ones in the report