Add weather API and fix some bugs.