     }()
 
     var applicationDocumentsDirectory: NSURL {
-        let url = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(Config.sharedGroupName)
-            if let actualurl = url {
-                return actualurl as NSURL
-            } else {
-                return NSURL()
-            }
+        let url = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier(AppConfig.ApplicationGroups.primary)
+        if let actualurl = url {
+            return actualurl as NSURL
+        } else {
+            return NSURL()
+        }
     }
 
     func addSkipBackupAttributeToItemAtURL( url: NSURL) -> Void


    lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = {

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



        childContext.performBlock {
            let fetchRequest = NSFetchRequest(entityName: "CDPlot")
            let interval: NSTimeInterval = -1.0*((1.0+AppConfig.Global.plotHistory)*3600.0)
            let time = NSDate(timeIntervalSinceNow: interval)
            fetchRequest.predicate = NSPredicate(format: "plotTime < %@", time)

