Changes to the javascript