 import Photos
 
 public struct PhotoLibraryDataSource {
+    public private(set) var fetchResult: PHFetchResult<PHAsset>
     public private(set) var collection: PHAssetCollection
     public private(set) var assets: [PHAsset]
 }

                options.wantsIncrementalChangeDetails = true
                
                var assets = [PHAsset]()
                let result = PHAsset.fetchAssets(in: collection, options: options)
                result.enumerateObjects(options: []) { (asset, _, _) in
                    assets.append(asset)
                }
                s.assetFetchResults.append(result)
                
                s.collections.append(PhotoLibraryDataSource(collection: collection, assets: assets))
            }
        }
    }
    
    /// A method used to prepare the instance object.
    private func prepare() {
        prepareAssetFetchResults()
        prepareCollections()
        prepareChangeObservers()
    }
    
    /// Prepares the collectionFetchResult.
    private func prepareAssetFetchResults() {
        assetFetchResults = [PHFetchResult<PHAsset>]()
    }
    
    /// Prepares the collections.

    /**
     A delegation method that is executed when there are changed objects.
     - Parameter photoLibrary: A reference to the PhotoLibrary.
     - Parameter changed indexes: An IndexSet of the changed indexes.
     - Parameter for objects: An Array of PHObjects that have been changed.
     */
    @objc
    optional func photoLibrary(photoLibrary: PhotoLibrary, changed indexes: IndexSet, for objects: [PHObject])
    
    /**
     A delegation method that is executed describing the removed, inserted
     and changed indexes.
     - Parameter photoLibrary: A reference to the PhotoLibrary.
     - Parameter removedIndexes: An IndexSet of the changed indexes.
     - Parameter insertedIndexes: An IndexSet of the inserted indexes.
     - Parameter changedIndexes: An IndexSet of the changed indexes.
     */
    @objc
    optional func photoLibrary(photoLibrary: PhotoLibrary, removedIndexes: IndexSet?, insertedIndexes: IndexSet?, changedIndexes: IndexSet?)
    
    /**
     A delegation method that is executed when there are moves
     within the photo library.
     - Parameter photoLibrary: A reference to the PhotoLibrary.
     - Parameter hasMoves from: The from index.
     - Parameter to: The to index.
     */
    @objc
    optional func photoLibrary(photoLibrary: PhotoLibrary, hasMoves from: Int, to: Int)
}

@objc(PhotoLibrary)
public class PhotoLibrary: NSObject {
    /// A reference to the type currently being managed.
    public private(set) var type: PHAssetCollectionType?
    
    /// A reference to the subtype currently being managed.
    public private(set) var subtype: PHAssetCollectionSubtype?
    
    /// A reference to the PHCachingImageManager.
    public private(set) lazy var cachingImageManager = PHCachingImageManager()
    
    /// A reference to the collection PHFetchResult.
    public private(set) var collectionFetchResult: PHFetchResult<PHAssetCollection>?
    
    /// The assets used in the album.
    public private(set) var collections: [PhotoLibraryDataSource]! {
