Fixed some bugs and refactored code.Make flickr async