Cleaned up flickr code