cleaned up javascripts