 
 // MARK: -
 
-open class PersistentContainer<Context: NSManagedObjectContext> {
-    
-    // MARK: -
-    
-    fileprivate let rawValue: NSPersistentContainer
+open class PersistentContainer: NSPersistentContainer {
+    
+    // MARK: -
+    
     fileprivate let enableUbiquity: Bool
-
+    
     // MARK: -
     
     public init(bundle: Bundle = Bundle.main, storageType: StorageType = .disk, name: String? = nil, managedObjectModel: NSManagedObjectModel? = nil, managedObjectModelURL: URL? = nil, persistentStoreURL: URL? = nil, ubiquitousContainerIdentifier: String? = nil, ubiquitousContentRelativePath: String? = nil, ubiquitousContentName: String? = nil) throws {
         //
         guard let name = name ?? bundle.bundleIdentifier else {
-            throw Error.invalidName
+            throw PersistentContainerError.invalidName
         }
         
         guard let managedObjectModelURL = managedObjectModelURL ?? bundle.managedObjectModelURL(forManagedObjectModelName: name) else {
-            throw Error.invalidManagedObjectModelURL
+            throw PersistentContainerError.invalidManagedObjectModelURL
         }
         
         guard let managedObjectModel = managedObjectModel ?? NSManagedObjectModel(contentsOf: managedObjectModelURL) ?? NSManagedObjectModel.mergedModel(from: [bundle]) else {
-            throw Error.managedObjectModelNotFound
-        }
-
+            throw PersistentContainerError.managedObjectModelNotFound
+        }
+        
         guard let persistentStoreURL = persistentStoreURL ?? bundle.persistentStoreURL(forManagedObjectModelName: name, applicationName: name) else {
-            throw Error.invalidPersistentStoreURL
-        }
-        
-        //
-        self.rawValue = HelperPersistentContainer(name: name, managedObjectModel: managedObjectModel)
+            throw PersistentContainerError.invalidPersistentStoreURL
+        }
+        
+        //
         self.enableUbiquity = (ubiquitousContainerIdentifier != nil)
+        super.init(name: name, managedObjectModel: managedObjectModel)
         
         //
         if storageType == .disk {

        }
        
        //
        self.rawValue.persistentStoreDescriptions = [persistentStoreDescription]
        
        //
        var outError: Swift.Error?
        
        self.rawValue.loadPersistentStores { description, error in
            if let error = error {
                outError = error
                return
            }
            
            if self.enableUbiquity {
                NotificationCenter.default.addObserver(self, selector: #selector(type(of: self).persistentStoreDidImportUbiquitousContentChanges(notification:)), name: .NSPersistentStoreDidImportUbiquitousContentChanges, object: self.rawValue.persistentStoreCoordinator)
            }
        }
        
        if let outError = outError {
            throw outError
        }
    }
    
    deinit {
        if self.enableUbiquity {
            NotificationCenter.default.removeObserver(self, name: .NSPersistentStoreDidImportUbiquitousContentChanges, object: self.rawValue.persistentStoreCoordinator)
        }
    }
    
    // MARK: -
    
    @objc private func persistentStoreDidImportUbiquitousContentChanges(notification: Notification) {
        let context = self.rawValue.viewContext.parent ?? self.rawValue.viewContext
        
        context.perform {
            context.mergeChanges(fromContextDidSave: notification)

                try FileManager.default.createDirectory(atPath: directoryPath, withIntermediateDirectories: true)
            }
        }
        
        //
        let persistentStoreDescription = NSPersistentStoreDescription(url: persistentStoreURL)
        
