Refactor Flickr functionality to a dedicated service class.