javascripts cleanup