Changed all JSON parseing and serialization to use JSON.stringify and JSON.parse