Added detection of datasets in array method and made cast work with
compound datasets
Fixed unwrapping method and add tests of that and cast