refactored flickr controller