Updated return helper function and changed string to json format.

Updated function that generates the report string based on Adrian's feedback.