         }
     }
     
-    public static func toJSON(_ x: Date) -> JSONValue {
-        return .string(x.isoString)
+    public static func toJSON(_ date: Date) -> JSONValue {
+        return .string(date.isoString)
     }
 }
 
 extension NSDate: JSONable {
-    public static func fromJSON(_ x: JSONValue) -> NSDate? {
-        return Date.fromJSON(x) as NSDate?
+    public static func fromJSON(_ json: JSONValue) -> NSDate? {
+        return Date.fromJSON(json) as NSDate?
     }
     
-    public static func toJSON(_ x: NSDate) -> JSONValue {
-        return Date.toJSON(x as Date)
+    public static func toJSON(_ date: NSDate) -> JSONValue {
+        return Date.toJSON(date as Date)
     }
 }
 
 extension NSNull: JSONable {
-    public class func fromJSON(_ x: JSONValue) -> NSNull? {
-        switch x {
+    public class func fromJSON(_ json: JSONValue) -> NSNull? {
+        switch json {
         case .null:
             return NSNull()
         default:

        }
    }
    
    public static func toJSON(_ xs: Double) -> JSONValue {
        return JSONValue.number(.fraction(xs))
    }
}

extension NSNumber: JSONable {
    public class func fromJSON(_ x: JSONValue) -> NSNumber? {
        switch x {
        case let .number(n):
            switch n {
            case .int(let i): return NSNumber(value: i)

        }
    }
    
    public class func toJSON(_ num: NSNumber) -> JSONValue {
        if num.isBool {
            return JSONValue.bool(num.boolValue)
        }
        else if num.isReal {
            return JSONValue.number(.fraction(num.doubleValue))
        }
        else {
            return JSONValue.number(.int(num.int64Value))
        }
    }
}

extension String: JSONable {
    public static func fromJSON(_ json: JSONValue) -> String? {
        switch json {
        case let .string(n):
            return n
        default:
