cleaning up some of the javascripts