Restructure, tests, adding Flickr functionality