Fixed some minor bugs and push to file

+pushing json strings to a file
+fixed the slashes (\) in the json string
+added comments