     internal func toData() -> NSData {
         return NSKeyedArchiver.archivedDataWithRootObject([
             "type": type,
-            "associated_values": associatedValues
+            "values": values
         ])
     }
 }
        guard let
            dictionary = NSKeyedUnarchiver.unarchiveObjectWithData(data) as? [String: AnyObject],
            type = dictionary["type"] as? String,
            associatedValues = dictionary["associated_values"] as? [AnyObject]
        else {
            return nil
        }
        
        if type == "request", let key = associatedValues[safe: 0] as? Key {
            self = Request(key)
        }
        
        else if type == "response", let key = associatedValues[safe: 0] as? Key {
            self = Response(key, associatedValues[safe: 1])
        }
        
        else if type == "insert", let keys = associatedValues[safe: 0] as? [Key] {
            self = Insert(keys)
        }
        
        else if type == "delete", let keys = associatedValues[safe: 0] as? [Key] {
            self = Delete(keys)
        }
        

        }
    }
    
    private var values: [AnyObject] {
        switch self {
        case let Request(key):   return [key]
        case let Response(k, v): return [k, v].flatMap({$0})
