Improved javascripts