Getting index.js into submitting form

More comments, and removing dependence on the examplejson.js file