Move wait() method to Dataset superclass, so it can be applied also to LibraryDatasets.