 
     }
 
+    /// Create a MediaSource for a local asset. This allows the player to play a downloaded asset.
     private func createLocalMediaSource(for assetId: String, localURL: URL) -> MediaSource {
         return LocalMediaSource(storage: self.storage, id: assetId, localContentUrl: localURL)
     }
 
-    
+    /// Create a MediaEntry for a local asset. This is a convenience function that wraps the result of
+    /// `createLocalMediaSource(for:localURL:)` with a MediaEntry.
     public func createLocalMediaEntry(for assetId: String, localURL: URL) -> MediaEntry {
         let mediaSource = createLocalMediaSource(for: assetId, localURL: localURL)
         return MediaEntry.init(assetId, sources: [mediaSource])
     }
     
+    /// Get the preferred MediaSource for download purposes. This function takes into account
+    /// the capabilities of the device.
     public func getPreferredDownloadableMediaSource(for mediaEntry: MediaEntry) -> MediaSource? {
 
         guard let sources = mediaEntry.sources else {return nil}

    func remove(key: String) throws
}

/**
 Implementation of LocalDataStore that saves data to files in the Library directory.
 */ 
public class DefaultLocalDataStore: LocalDataStore {

    static let pkLocalDataStore = "pkLocalDataStore"

        return nil
    }

    /// Prepare a MediaEntry for download using AVAssetDownloadTask. 
    public func prepareForDownload(of mediaEntry: MediaEntry) -> (AVURLAsset, MediaSource)? {
        guard let source = getPreferredDownloadableMediaSource(for: mediaEntry) else { return nil }
        guard let url = source.contentUrl else { return nil }
