 
     if let regexMatch = regex.firstMatchInString(xcodebuildOutput, options: nil, range: range) {
         let escapedSpacePlaceholder = "\u{0}"
-        var args = xcodebuildOutput
+        let args = xcodebuildOutput
             .substringWithRange(regexMatch.range)
             .stringByReplacingOccurrencesOfString("\\ ", withString: escapedSpacePlaceholder)
             .componentsSeparatedByString(" ")
 
-        args.removeAtIndex(0) // Remove swiftc
-
-        return args.filter({ $0 != "-parseable-output" }).map {
+        // Remove swiftc/clang, -parseable-output and re-add spaces in arguments
+        return Array<String>(args[1..<args.count]).filter({ $0 != "-parseable-output" }).map {
             $0.stringByReplacingOccurrencesOfString(escapedSpacePlaceholder, withString: " ")
         }
     }
 
-    return nil
-}
-
-/**
-Parses the compiler arguments needed to compile the Objective-C aspects of an Xcode project
-
-:param: xcodebuildOutput output of `xcodebuild` to be parsed for clang compiler arguments
-
-:returns: array of clang compiler arguments
-*/
-func clang_arguments_from_xcodebuild_output(xcodebuildOutput: NSString) -> [String]? {
-    let regex = NSRegularExpression(pattern: "/usr/bin/clang.*", options: nil, error: nil)!
-    let range = NSRange(location: 0, length: xcodebuildOutput.length)
-
-    if let regexMatch = regex.firstMatchInString(xcodebuildOutput, options: nil, range: range) {
-        let escapedSpacePlaceholder = "\u{0}"
-        var args = xcodebuildOutput
-            .substringWithRange(regexMatch.range)
-            .stringByReplacingOccurrencesOfString("\\ ", withString: escapedSpacePlaceholder)
-            .componentsSeparatedByString(" ")
-
-        args.removeAtIndex(0) // Remove clang
-
-        return args.filter({ $0 != "-parseable-output" }).map {
-            $0.stringByReplacingOccurrencesOfString(escapedSpacePlaceholder, withString: " ")
-        }
-    }
-    
     return nil
 }
 

    for (key, object) in dictionary {
        switch object {
        case let object as XPCArray:
            var anyArray = [AnyObject]()
            for subDict in object {
                anyArray.append(toAnyObject(subDict as XPCDictionary))
            }
            anyDictionary[key] = anyArray
        case let object as XPCDictionary:
            anyDictionary[key] = toAnyObject(object)
        case let object as String:

:returns: Converted JSON
*/
func toJSON(array: XPCArray) -> String {
    return toJSON(array.map { toAnyObject($0 as XPCDictionary) })
}

/**
