     }
     
     // map a JSON string onto an existing object
-    public func map(string JSON: String, var toObject object: N) -> N! {
-        var json = parseJSONDictionary(JSON)
-        if let json = json {
-            mappingType = .fromJSON
-            self.JSONDictionary = json
-            object.map(self)
-            
-            return object
-        }
-        return nil
+    public func map(string JSONString: String, var toObject object: N) -> N! {
+        let JSON = parseJSONDictionary(JSONString)
+        return JSON.map { self.map($0, toObject: object) }
     }
     
     // map a JSON string to an object Type that conforms to Mappable
     public func map(string JSONString: String) -> N! {
-        var json = parseJSONDictionary(JSONString)
-        if let json = json {
-            return map(json)
-        }
-        return nil
+        let JSON = parseJSONDictionary(JSONString)
+        return JSON.map { self.map($0) }
     }
     
     // maps a JSON dictionary to an object that conforms to Mappable
     public func map(JSON: [String : AnyObject]) -> N! {
-        var object = N()
+        let object = N()
         return map(JSON, toObject: object)
     }
     


	// maps a JSON array to an object that conforms to Mappable
	public func mapArray(string JSONString: String) -> [N]! {
		var jsonArray = parseJSONArray(JSONString)
		if let jsonArray = jsonArray {
			return mapArray(jsonArray)
		} else {
			// failed to parse JSON into array form
			// try to parse it into a dictionary and then wrap it in an array
			var jsonDict = parseJSONDictionary(JSONString)
			if let jsonDict = jsonDict {
				return mapArray([jsonDict])
			}
		}
		return nil
	}
	

	public func mapArray(JSON: [[String : AnyObject]]) -> [N] {
		mappingType = .fromJSON
		
		var objects = [N]()
		
		for innerJSON in JSON {
			self.JSONDictionary = innerJSON
