         else {
             dispatch_sync(dispatch_get_main_queue(), createContext)
         }
+
+        managedObjectContext = context!
         
-        return context!
-    }()
-    
-    lazy var managedObjectModel: NSManagedObjectModel = {
-       NSManagedObjectModel.init(contentsOfURL: self._modelURL)!
-    }()
-    
-    lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator = {
-        var coordinator: NSPersistentStoreCoordinator = NSPersistentStoreCoordinator.init(managedObjectModel: self.managedObjectModel)
-        do {
-            try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: self._storeURL, options: nil)
-        }
-        catch {
-            var dict = [NSLocalizedDescriptionKey: "Failed to initialize the application's saved data"]
-            dict[NSLocalizedFailureReasonErrorKey] = "There was an error creating or loading the application's saved data."
-            dict[NSUnderlyingErrorKey] = "\(error)"
-            print("Error: \(dict)\n\n Now deleting and recreating the database.")
-            
-            do {
-                try NSFileManager.defaultManager().removeItemAtURL(self._storeURL)
-                try coordinator.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: self._storeURL, options: nil)
-            }
-            
-            catch {
-                print("Error, aborting: \(error)")
-                abort()
-            }
-        }
-        
-        NSNotificationCenter.defaultCenter().addObserver(self, selector: "managedObjectContextUpdated:", name: NSManagedObjectContextDidSaveNotification, object: nil)
-        
-        return coordinator
-    }()
-    
-    private var _modelURL: NSURL
-    private var _storeURL: NSURL
-    private var _threadDictionariesWithManagedObjectContexts = Set<NSMutableDictionary>()
-    private let _lockQueue = dispatch_queue_create("com.cjoseph.coredatastack", DISPATCH_QUEUE_SERIAL)
-    
-    public init(modelURL: NSURL, storeURL: NSURL) {
-        _modelURL = modelURL
-        _storeURL = storeURL
         super.init()
         NSNotificationCenter.defaultCenter().addObserver(self, selector: "threadWillExit:", name: NSThreadWillExitNotification, object: nil)
+        NSNotificationCenter.defaultCenter().addObserver(self, selector: "managedObjectContextUpdated:", name: NSManagedObjectContextDidSaveNotification, object: nil)
     }
     
     deinit {

public class CoreDataStack: NSObject {
    public static var mainStack: CoreDataStack?
    
    lazy public private(set) var managedObjectContext: NSManagedObjectContext = {
        var context: NSManagedObjectContext?
        
        let createContext = {
            context = NSManagedObjectContext.init(concurrencyType: .MainQueueConcurrencyType)
            context?.persistentStoreCoordinator = self.persistentStoreCoordinator
            context?.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
            self.storeContextForCurrentThread(context!)
        }
        
        if NSThread.isMainThread() {

    }
    
    public func contextForCurrentThread() -> NSManagedObjectContext {
        if NSThread.isMainThread() {
            return managedObjectContext
        }
        else if let context = NSThread.currentThread().threadDictionary[self.description] as? NSManagedObjectContext {
            return context
        }
        else {
            let context = NSManagedObjectContext.init(concurrencyType: .PrivateQueueConcurrencyType)
            context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
            context.persistentStoreCoordinator = persistentStoreCoordinator
            self.storeContextForCurrentThread(context)
            
            return context
        }
    }
    
