Some updates to the javascript