cleaning up javascripts