         
         let coordinator = NSPersistentStoreCoordinator(managedObjectModel: mom)
         let url = containerURL.URLByAppendingPathComponent("\(modelName).sqlite")
-        let storeType = inMemoryStore ? NSInMemoryStoreType : NSSQLiteStoreType
-        
-        let options = [
-            NSMigratePersistentStoresAutomaticallyOption : true,
-            NSInferMappingModelAutomaticallyOption : true
-        ]
-        
+
         do {
-            try coordinator.addPersistentStoreWithType(storeType, configuration: nil, URL: url, options: options)
+            try coordinator.addPersistentStoreWithType(storeType, configuration: nil, URL: url, options: storeOptions)
         }
         catch let error as NSError {
             Log("Attempt to add `persistentStoreCoordinator` failed with error: \(error.localizedDescription)")
-            do {
-                try self.removeDBFiles()
-            }
-            catch {}
+            try self.removeDBFiles()
         }
         
         return coordinator
     }
     
     
-    private func createWritingContext() -> NSManagedObjectContext? {
+    private func createWritingContext() -> NSManagedObjectContext {
         guard let psc = persistentStoreCoordinator else {
             Log("Attempting to create `writingContext` before the `persistentStoreCoordinator` is set up.")
-            return nil
-        }
-        
-        guard writingContext == nil else {
-            return writingContext
+            return
         }
 
         let managedObjectContext = NSManagedObjectContext(concurrencyType: .PrivateQueueConcurrencyType)

    }
    
    
    private func createMainContext() -> NSManagedObjectContext? {
        guard let wc = writingContext else {
            Log("Attempting to create `mainContext` before the persistent store coordinator is setup.")
            return nil

    
    
    private func removePersistentStore() throws {
        
    }
    
    private func removeDBFiles() throws {

    }
    
    @available(iOS 9.0, *)
    private func destroyPersistentStoreIOS9() throws {
        //The store has already been destroyed if the persistentStoreCoordinator is nil here so bail silently.
        guard let psc = persistentStoreCoordinator else {
            return
        }
        
        do {
            let url = containerURL.URLByAppendingPathComponent("\(modelName).sqlite")
            try psc.destroyPersistentStoreAtURL(url, withType: storeType, options: storeOptions)
        }
        catch let error as NSError {
            throw error
