Complete re-write of OpenPics using Swift