     }()
 
     lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = {
+
         let storeUrl = self.applicationDocumentsDirectory.URLByAppendingPathComponent(Config.sqliteName)
         var error: NSError? = nil
         var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel!)

    }()

    var applicationDocumentsDirectory: NSURL {
    let url = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(Config.sharedGroupName)
        if let actualurl = url {
            return actualurl as NSURL
        } else {
            return NSURL()
        }
    }

    func addSkipBackupAttributeToItemAtURL( url: NSURL) -> Void {
//        assert(NSFileManager.defaultManager().fileExistsAtPath(url.path), "File must exist", file: __FILE__, line: __LINE__)
//
//        var error: NSError? = nil
//        let success = url.setResourceValue(true, forKey: NSURLIsExcludedFromBackupKey, error:&error)
//        if success == false {
//            NSLog("Error excluding \(url.lastPathComponent) from backup \(error)");
//        }
    }

    var dateFormatter: NSDateFormatter {

        }
    }

    public func cleanupPlots()
    {
        let childContext = NSManagedObjectContext(concurrencyType: NSManagedObjectContextConcurrencyType.PrivateQueueConcurrencyType)
        childContext.parentContext = managedObjectContext
        childContext.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
        childContext.undoManager = nil
        var err: NSError?

