Cleaned up javascripts