Small edits to the javascript