Modifed submit.js to use jquery and refactored some on index.html