JavaScript code cleanup
Changed JSON serialization protocol to something more consistent