Add save/open collections, fix bugs