     // MARK: Perform request
     class func performRequest(request: LocksmithRequest) -> (NSDictionary?, NSError?) {
         let type = request.type
-        var result: Unmanaged<AnyObject>? = nil
+        //var result: Unmanaged<AnyObject>? = nil
+        var result: AnyObject?
         var status: OSStatus?
         
         var parsedRequest: NSMutableDictionary = parseRequest(request)

        
        switch type {
        case .Create:
            status = SecItemAdd(requestReference, &result)
        case .Read:
            status = SecItemCopyMatching(requestReference, &result)
        case .Delete:
            status = SecItemDelete(requestReference)
        case .Update:
            status = Locksmith.performUpdate(requestReference, result: &result)
        default:
            status = nil
        }

        }
    }
    
    private class func performUpdate(request: CFDictionaryRef, inout result: AnyObject?) -> OSStatus {
        // We perform updates to the keychain by first deleting the matching object, then writing to it with the new value.
        SecItemDelete(request)
        // Even if the delete request failed (e.g. if the item didn't exist before), still try to save the new item.
        // If we get an error saving, we'll tell the user about it.
        
        var status: OSStatus = withUnsafeMutablePointer(&result) { SecItemAdd(request, UnsafeMutablePointer($0)) }
        return status
    }
    
