Tidied up some of the JavaScript