 import Alamofire
 import SwiftyJSON
 import CoreData
+import PromiseKit
 class Account {
 
     // Protected members

        created = DateConv.toDate(timestamp: account["created"].stringValue)
        id = account["id"].intValue
        email = account["email"].stringValue
        fetchRequest.predicate = NSPredicate(format: "id == %@", id)
        var result: [NSManagedObject] = []
        // 3
        do {

            autoDelete = true;
            autoBackUp = true;
            initializeSettings()
            initializeMetaData()
        }
        else{
             wifiOnlyBackup = result[0].value(forKeyPath: "wifiOnlyBackup") as! Bool
