Make flickr functions a little more testable, add a trivial unit test