             throw error
         }
     }
-    
-    /// These two methods are just to clean up the map methods, this is where the Argo mapping occurs
-    /// Return value is Decoded<T> (the Argo decoding result)
-    private func decodedObject<T:Decodable where T == T.DecodedType>(rootKey: String?, JSON: AnyObject) -> Decoded<T> {
-        if let rootKey = rootKey {
-            return decodeWithRootKey(rootKey, JSON)
-        } else {
-            return decode(JSON)
-        }
-    }
-    
-    private func decodedArray<T:Decodable where T == T.DecodedType>(rootKey: String?, JSON: AnyObject) -> Decoded<[T]> {
-        if let rootKey = rootKey {
-            return decodeWithRootKey(rootKey, JSON)
-        } else {
-            return decode(JSON)
-        }
-    }
 }

            //map to JSON
            let JSON = try self.mapJSON()
            
            //return array of decoded objects, or throw decoding error
            return try decodedValue(decodedArray(rootKey, JSON: JSON))
            
        } catch {
            

            //map to JSON
            let JSON = try self.mapJSON()
            
            //decode with Argo
            let decodedObject:Decoded<T>
            if let rootKey = rootKey {
                decodedObject = decodeWithRootKey(rootKey, JSON)
            } else {
                decodedObject = decode(JSON)
            }
            
            //return decoded value, or throw decoding error
            return try decodedValue(decodedObject)
            
        } catch {
            
