Index: /XmlTools2/trunk/optionsparser.cpp
===================================================================
--- /XmlTools2/trunk/optionsparser.cpp	(revision 966)
+++ /XmlTools2/trunk/optionsparser.cpp	(revision 967)
@@ -97,7 +97,7 @@
 
                 if(line.startsWith('"')){ // Only read when starting with quotes
-                    temp=line.split(" \""); // We need to use more than space, because if paths contains spaces...
-                    patchFiles << temp[0].remove('"'); // remove the quotes, they are now not needed
-                    targetXmlFiles << temp[1].remove('"');
+                    temp=line.split('"',QString::SkipEmptyParts); // We need to use more than space, because if paths contains spaces...
+                    patchFiles << temp[0];
+                    targetXmlFiles << temp[2]; // space is in idx 1
                 }
             }
@@ -106,5 +106,4 @@
 
             // Now let's process each patch file and target file
-            //#pragma omp parallel for
             for(int i=0; i<patchFiles.size(); i++){
                 XmlPatch myXmlPatch(patchFiles[i],targetXmlFiles[i],true,true); // use --no-backups and --no-verbose for AEI
Index: /XmlTools2/trunk/readme.txt
===================================================================
--- /XmlTools2/trunk/readme.txt	(revision 966)
+++ /XmlTools2/trunk/readme.txt	(revision 967)
@@ -62,7 +62,7 @@
 Change Log:
 ----------------------------------
-2.0a, 20-02-2014
+2.0a, 02-03-2014
 -Added multithreading support for @CUSTOM_COMMAND, use wildcards in multiple files for the same js code to 
-take advantage of this (performance may increase over 2.5 times)
+take advantage of this (performance may increase over 3 times for a quadcore)
 -Now a warning is given if a user javascript code (@CUSTOM_COMMAND) takes too much time to finish
 -Fixed small bug when applying patches with @COMMAND + --no-verbose where some std output should not be displayed
Index: /XmlTools2/trunk/util.h
===================================================================
--- /XmlTools2/trunk/util.h	(revision 966)
+++ /XmlTools2/trunk/util.h	(revision 967)
@@ -52,5 +52,5 @@
 }
 
-// Needs optimization
+//TODO Needs optimization
 inline QStringList QStringToArgsArray(const QString &args){
     QStringList result;
Index: /XmlTools2/trunk/xmlcustomcode.cpp
===================================================================
--- /XmlTools2/trunk/xmlcustomcode.cpp	(revision 966)
+++ /XmlTools2/trunk/xmlcustomcode.cpp	(revision 967)
@@ -37,13 +37,13 @@
             // alternatively you can do: myFunc=engine.evaluate('(function main(){})'); myFunc.call();
             // Note the () around the function
-            this->getXmlDataFunctions.append(new QScriptValue(this->scriptEngines[i]->evaluate("(function getXmlData() { return $xmlData; })")));
-            this->setXmlDataFunctions.append(new QScriptValue(this->scriptEngines[i]->evaluate("(function setXmlData(newXmlData) { $xmlData=newXmlData; })")));
+            this->getXmlDataFunctions.append(new QScriptValue(this->scriptEngines.at(i)->evaluate("(function getXmlData() { return $xmlData; })")));
+            this->setXmlDataFunctions.append(new QScriptValue(this->scriptEngines.at(i)->evaluate("(function setXmlData(newXmlData) { $xmlData=newXmlData; })")));
 
             // Add echo function so user can debug the code
-            QScriptValue echoFunction = this->scriptEngines[i]->newFunction(echo);
-            this->scriptEngines[i]->globalObject().setProperty("echo", echoFunction);
+            QScriptValue echoFunction = this->scriptEngines.at(i)->newFunction(echo);
+            this->scriptEngines.at(i)->globalObject().setProperty("echo", echoFunction);
 
             // Add the js library for XmlEditing
-            this->scriptEngines[i]->evaluate(jsxmlString);
+            this->scriptEngines.at(i)->evaluate(jsxmlString);
         }
     }
@@ -54,5 +54,5 @@
     // Reconstruct script functions
     for(int i=0; i<this->numThreads; i++){
-        *this->jsFunctions[i]=this->scriptEngines[i]->evaluate("(function main() {"+jsString+"})");
+        *this->jsFunctions[i]=this->scriptEngines.at(i)->evaluate("(function main() {"+jsString+"})");
     }
 
@@ -63,11 +63,11 @@
     clock_t begin; // seconds that a script started
 
-    // Single tread if small files
+    // Single tread if small number of files
     if(filesToProcess.size()<CUSTOM_FILES_PER_THREAD){
         // Process all XmlFiles
         for(int i=0; i<filesToProcess.size(); i++){
 
-            customCodeUnwinding(filesToProcess.at(i),currXmlFileString,*this->scriptEngines[0],begin,elapsed_secs,engineResult,
-                    *this->jsFunctions[0],*this->getXmlDataFunctions[0],*this->setXmlDataFunctions[0],backupsEnabled,verboseEnabled);
+            customCodeUnwinding(filesToProcess.at(i),currXmlFileString,*this->scriptEngines.at(0),begin,elapsed_secs,engineResult,
+                    *this->jsFunctions.at(0),*this->getXmlDataFunctions.at(0),*this->setXmlDataFunctions.at(0),backupsEnabled,verboseEnabled);
         }
     }
@@ -85,9 +85,9 @@
             clock_t beginThread; // seconds that a script started
 
-            customCodeUnwinding(filesToProcess.at(i),currXmlFileStringThread,*this->scriptEngines[tid],beginThread,elapsedSecsThread,engineResultThread,
-                                *this->jsFunctions[tid],*this->getXmlDataFunctions[tid],*this->setXmlDataFunctions[tid],backupsEnabled,verboseEnabled);
+            customCodeUnwinding(filesToProcess.at(i),currXmlFileStringThread,*this->scriptEngines.at(tid),beginThread,elapsedSecsThread,engineResultThread,
+                                *this->jsFunctions.at(tid),*this->getXmlDataFunctions.at(tid),*this->setXmlDataFunctions.at(tid),backupsEnabled,verboseEnabled);
 
-            customCodeUnwinding(filesToProcess.at(i+1),currXmlFileStringThread,*this->scriptEngines[tid],beginThread,elapsedSecsThread,engineResultThread,
-                                *this->jsFunctions[tid],*this->getXmlDataFunctions[tid],*this->setXmlDataFunctions[tid],backupsEnabled,verboseEnabled);
+            customCodeUnwinding(filesToProcess.at(i+1),currXmlFileStringThread,*this->scriptEngines.at(tid),beginThread,elapsedSecsThread,engineResultThread,
+                                *this->jsFunctions.at(tid),*this->getXmlDataFunctions.at(tid),*this->setXmlDataFunctions.at(tid),backupsEnabled,verboseEnabled);
         }
 
@@ -98,6 +98,6 @@
             for(int i=alreadyProcessedFiles; i<filesToProcess.size(); i++){
 
-                customCodeUnwinding(filesToProcess.at(i),currXmlFileString,*this->scriptEngines[0],begin,elapsed_secs,engineResult,
-                        *this->jsFunctions[0],*this->getXmlDataFunctions[0],*this->setXmlDataFunctions[0],backupsEnabled,verboseEnabled);
+                customCodeUnwinding(filesToProcess.at(i),currXmlFileString,*this->scriptEngines.at(0),begin,elapsed_secs,engineResult,
+                        *this->jsFunctions.at(0),*this->getXmlDataFunctions.at(0),*this->setXmlDataFunctions.at(0),backupsEnabled,verboseEnabled);
             }
         }
Index: /XmlTools2/trunk/xmlpatch.cpp
===================================================================
--- /XmlTools2/trunk/xmlpatch.cpp	(revision 966)
+++ /XmlTools2/trunk/xmlpatch.cpp	(revision 967)
@@ -230,5 +230,5 @@
     QString line, patchVersion="";
 
-    // First get the patch version and check it validity
+    // First get the patch version and check its validity
     while ( !fileStream.atEnd() ){
         line = fileStream.readLine();
