more cleanup in javascripts