Index: tmp/org.txm.core/src/java/org/txm/objects/Project.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1176)
+++ tmp/org.txm.core/src/java/org/txm/objects/Project.java	(revision 1177)
@@ -802,12 +802,19 @@
 		//		}
 
 		if (!rcpProject.getName().equals(pName)) { // project directory and project name must stay in sync
+			IPath path = rcpProject.getProjectRelativePath();
+			String name = rcpProject.getName();
 			IPath destination = new Path(this.getName());
-			if (destination.toFile().exists()) {
-				System.out.println("Error: could not rename project since one already existing with the same new name="+this.getName());
-				return false;
+			
+			IWorkspace rcpWorkspace = ResourcesPlugin.getWorkspace();
+			IProject p2 = rcpWorkspace.getRoot().getProject(this.getName());
+			if (p2.exists()) {
+				//System.out.println("Error: could not rename project since one already existing with the same new name="+this.getName());
+				//return false;
+				rcpProject = p2;
+			} else {
+				rcpProject.move(destination, true, null);
 			}
-			rcpProject.move(destination, true, null);
 		}
 
 		ImportEngines engines = Toolbox.getImportEngines();
@@ -1007,7 +1014,7 @@
 
 	public String getTokenizerWordElement() {
 		IEclipsePreferences params = this.getPreferencesScope().getNode("Tokenizer");
-		return params.get("wordelement", "w");
+		return params.get("word_tags", "w");
 	}
 
 	public boolean getDoTokenizerStep() {
Index: tmp/org.txm.core/src/java/org/txm/scripts/importer/MileStoneProjection.groovy
===================================================================
--- tmp/org.txm.core/src/java/org/txm/scripts/importer/MileStoneProjection.groovy	(revision 1176)
+++ tmp/org.txm.core/src/java/org/txm/scripts/importer/MileStoneProjection.groovy	(revision 1177)
@@ -60,13 +60,13 @@
 			switch (event) {
 				case XMLStreamConstants.START_ELEMENT:
 					localname = parser.getLocalName()
-					if (start && localname == mileStoneTag) {
+					if (start && localname.equals(mileStoneTag)) {
 						milestonesLength << mileStoneDistance;
 						mileStoneDistance = 0
 						milestonesCounter++;
-					} else if (start && localname == wordTag) {
+					} else if (start && localname.equals(wordTag)) {
 						mileStoneDistance++
-					} else if (localname == startTag) {
+					} else if (localname.equals(startTag)) {
 						start = true
 					}
 					break;
@@ -75,6 +75,7 @@
 		milestonesLength[milestonesCounter] = mileStoneDistance;
 		parser.close()
 		milestonesCounter = 0;
+		//println milestonesLength
 	}
 
 
@@ -82,30 +83,30 @@
 	public void processStartElement() {
 		super.processStartElement();
 
-		if (start && localname == mileStoneTag) {
+		if (start && localname.equals(mileStoneTag)) {
 			mileStoneDistance = 0
 			mileStoneID = parser.getAttributeValue(null, "id")
 			if (mileStoneID == null) mileStoneID = parser.getAttributeValue("xml", "id");
 			if (mileStoneID == null) mileStoneID = "0";
 			
 			milestonesCounter++;
-		} else if (start && localname == wordTag) {
+		} else if (start && localname.equals(wordTag)) {
 			// println "end of $milestonesCounter len="+milestonesLength[milestonesCounter]+" dist="+mileStoneDistance
 			writer.writeAttribute(msEndAttributeName, Integer.toString((milestonesLength[milestonesCounter] - mileStoneDistance - 1)))
 			writer.writeAttribute(msStartAttributeName, Integer.toString(mileStoneDistance))
 			writer.writeAttribute(msIdAttributeName, mileStoneID)
 
 			mileStoneDistance++
-		} else if (localname == startTag) {
+		} else if (localname.equals(startTag)) {
 			start = true
 		}
 	}
 
 	public static void main(String[] args) {
-		File inputFile = new File("/home/mdecorde/TXM/corpora/BVHEPISTEMON2016/tokenized/1538_MarotAdole.xml")
-		File outputFile = new File("/home/mdecorde/TEMP/tmp.xml")
+		File inputFile = new File("/home/mdecorde/TXM-0.8.0-dev/corpora/XTZMILESTONES/tokenized/test.xml")
+		File outputFile = new File("/home/mdecorde/TXM-0.8.0-dev/corpora/XTZMILESTONES/tokenized/result.xml")
 
-		MileStoneProjection msp = new MileStoneProjection(inputFile, "body", "w", "lb");
+		MileStoneProjection msp = new MileStoneProjection(inputFile, "text", "w", "lb");
 		println "Sucess: "+msp.process(outputFile)
 	}
 }
Index: tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java
===================================================================
--- tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1176)
+++ tmp/org.txm.groovy.core/src/java/org/txm/groovy/core/GroovyScriptedImportEngine.java	(revision 1177)
@@ -123,7 +123,7 @@
 			Log.info("\nEnd of Groovy import script: " + ExecTimer.stop()); //$NON-NLS-1$
 			monitor.worked(90);
 
-			TokenizerClasses.reset();
+			TokenizerClasses.reset(); // restore default tokenizer classes
 
 			Object ready = binding.getVariable("readyToLoad"); //$NON-NLS-1$
 			if (ready != null && ready instanceof Boolean) {
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy	(revision 1176)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZCompiler.groovy	(revision 1177)
@@ -33,7 +33,7 @@
 		corpusname = module.getProject().getName();
 		regPath = module.getBinaryDirectory().getAbsolutePath() + "/registry/"+corpusname.toLowerCase()
 		
-		wtag = module.getProject().getTokenizerParameter("wordelement", "w");
+		wtag = module.getProject().getTokenizerWordElement();
 		
 		doNormalizeAttributeValues = "true".equals(module.getProject().getPreferencesScope().getNode("import").get(TBXPreferences.NORMALISEATTRIBUTEVALUES, "false"))
 		doNormalizeAnaValues = "true".equals(module.getProject().getPreferencesScope().getNode("import").get(TBXPreferences.NORMALISEANAVALUES, "false"))
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImporter.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImporter.groovy	(revision 1176)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZImporter.groovy	(revision 1177)
@@ -224,6 +224,7 @@
 					return false
 				} else {
 					if (inputFile.delete()) {
+						FileCopy.copy(outputFile, new File(outputFile.getParent(), "copy.xml"))
 						outputFile.renameTo(inputFile)
 					} else {
 						println "Fail to encode $milestone in ${inputFile}: could not replace the file."
@@ -358,9 +359,6 @@
 				File infile = f;
 				File outfile = new File(module.getBinaryDirectory(),"tokenized/"+f.getName());
 				SimpleTokenizerXml tokenizer = new SimpleTokenizerXml(infile, outfile, lang)
-				if (wordTag.length() > 0)
-					tokenizer.setWord_tags(wordTag);
-				tokenizer.setWord_element_to_create(wordTag)
 
 				if (outSideTextTagsRegex != null && outSideTextTagsRegex.trim().length() > 0) {
 					tokenizer.setOutSideTextTags(outSideTextTagsRegex)
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/filters/Tokeniser/SimpleTokenizerXml.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/filters/Tokeniser/SimpleTokenizerXml.groovy	(revision 1176)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/filters/Tokeniser/SimpleTokenizerXml.groovy	(revision 1177)
@@ -59,7 +59,7 @@
 
 	/** The word_tags. */
 	String word_tags = TokenizerClasses.word_tags;
-	String word_element_to_create = "w"
+	String word_element_to_create = TokenizerClasses.word_element_to_create;
 	Pattern reg_word_tags;
 	/** The intraword_tags. */
 	String intraword_tags = TokenizerClasses.intraword_tags;
@@ -153,6 +153,7 @@
 
 		word_tags = TokenizerClasses.word_tags;
 		reg_word_tags = Pattern.compile(word_tags);
+		
 		intraword_tags = TokenizerClasses.intraword_tags;
 		punct_strong = TokenizerClasses.punct_strong;
 		punct_all = TokenizerClasses.punct_all;
Index: tmp/org.txm.tokenizer.core/src/org/txm/tokenizer/TokenizerClasses.java
===================================================================
--- tmp/org.txm.tokenizer.core/src/org/txm/tokenizer/TokenizerClasses.java	(revision 1176)
+++ tmp/org.txm.tokenizer.core/src/org/txm/tokenizer/TokenizerClasses.java	(revision 1177)
@@ -85,6 +85,8 @@
 
 	/** The word_tags. */
 	public static String word_tags = "w";
+	/** the element to create when a word is created */
+	public static String word_element_to_create = "w";
 
 	/** The intraword_tags. */
 	public static String intraword_tags = "c|ex|caesura";
@@ -420,7 +422,6 @@
 		for (TTest test : tests) {
 			System.out.println(" "+test+"");
 		}
-
 	}
 
 	public static boolean isValid() {
@@ -538,51 +539,51 @@
 
 			if (debug) System.out.println(" Tokenizer parametrized with "+key+"="+value+"");
 
-			if (key == "tag_all")
+			if (key.equals("tag_all"))
 				tag_all = value;
-			else if (key == "enclitics")
+			else if (key.equals("enclitics"))
 				enclitics = value;
-			else if (key == "encliticsFR")
+			else if (key.equals("encliticsFR"))
 				encliticsFR = value;
-			else if (key == "div_tags")
+			else if (key.equals("div_tags"))
 				div_tags = value;
-			else if (key == "q_tags")
+			else if (key.equals("q_tags"))
 				q_tags = value;
-			else if (key == "extraword1_tags")
+			else if (key.equals("extraword1_tags"))
 				extraword1_tags = value;
-			else if (key == "corr_tags_no_seg")
+			else if (key.equals("corr_tags_no_seg"))
 				corr_tags_no_seg = value;
-			else if (key == "word_tags")
+			else if (key.equals("word_tags"))
 				word_tags = value;
-			else if (key == "intraword_tags")
+			else if (key.equals("intraword_tags"))
 				intraword_tags = value;
-			else if (key == "punct_quotes")
+			else if (key.equals("punct_quotes"))
 				punct_quotes = value;
-			else if (key == "punct_strong1")
+			else if (key.equals("punct_strong1"))
 				punct_strong1 = value;
-			else if (key == "punct_strong2")
+			else if (key.equals("punct_strong2"))
 				punct_strong2 = value;
-			else if (key == "punct_paren_open1")
+			else if (key.equals("punct_paren_open1"))
 				punct_paren_open1 = value;
-			else if (key == "punct_paren_open2")
+			else if (key.equals("punct_paren_open2"))
 				punct_paren_open2 = value;
-			else if (key == "punct_paren_close1")
+			else if (key.equals("punct_paren_close1"))
 				punct_paren_close1 = value;
-			else if (key == "punct_paren_close2")
+			else if (key.equals("punct_paren_close2"))
 				punct_paren_close2 = value;
-			else if (key == "punct_weak")
+			else if (key .equals("punct_weak"))
 				punct_weak = value;
-			else if (key == "entity")
+			else if (key.equals("entity"))
 				entity = value;
-			else if (key == "seg_tags")
+			else if (key.equals("seg_tags"))
 				seg_tags = value;
-			else if (key == "regPunct")
+			else if (key.equals("regPunct"))
 				regPunct = value;
-			else if (key == "regElision")
+			else if (key.equals("regElision"))
 				regElision = value;
-			else if (key == "whitespaces")
+			else if (key.equals("whitespaces"))
 				whitespaces = value;
-			else if (key == "punct_strong") // this is temporary
+			else if (key.equals("punct_strong")) // this is temporary
 				tmp_strong_punct = value; // this is temporary
 			else
 				System.out.println("MISSING TOKENIZER KEY: "+key);
@@ -642,63 +643,65 @@
 		String tmp_strong_punct = null;
 		IEclipsePreferences params = projectScope.getNode("Tokenizer");
 		try {
-			for (String key : params.childrenNames()) {
+			String[] keys = params.keys();
+			for (String key : keys) {
 				//					Element param = (Element) params.item(i);
 				//					String key = param.getAttribute("name");
-				String value = params.get("value", "");
+				String value = params.get(key, "");
 				//					if (value == null || value.length() == 0) value = param.getTextContent();
 				if (value.length() == 0) value = null;
 
 				if (debug) System.out.println(" Tokenizer parametrized with "+key+"="+value+"");
 
-				if (key == "tag_all")
+				if (key.equals("tag_all"))
 					tag_all = value;
-				else if (key == "enclitics")
+				else if (key.equals("enclitics"))
 					enclitics = value;
-				else if (key == "encliticsFR")
+				else if (key.equals("encliticsFR"))
 					encliticsFR = value;
-				else if (key == "div_tags")
+				else if (key.equals("div_tags"))
 					div_tags = value;
-				else if (key == "q_tags")
+				else if (key.equals("q_tags"))
 					q_tags = value;
-				else if (key == "extraword1_tags")
+				else if (key.equals("extraword1_tags"))
 					extraword1_tags = value;
-				else if (key == "corr_tags_no_seg")
+				else if (key.equals("corr_tags_no_seg"))
 					corr_tags_no_seg = value;
-				else if (key == "word_tags")
+				else if (key.equals("word_tags")) {
 					word_tags = value;
-				else if (key == "intraword_tags")
+					word_element_to_create = value; // FIXME for now
+				} else if (key.equals("intraword_tags"))
 					intraword_tags = value;
-				else if (key == "punct_quotes")
+				else if (key.equals("punct_quotes"))
 					punct_quotes = value;
-				else if (key == "punct_strong1")
+				else if (key.equals("punct_strong1"))
 					punct_strong1 = value;
-				else if (key == "punct_strong2")
+				else if (key.equals("punct_strong2"))
 					punct_strong2 = value;
-				else if (key == "punct_paren_open1")
+				else if (key.equals("punct_paren_open1"))
 					punct_paren_open1 = value;
-				else if (key == "punct_paren_open2")
+				else if (key.equals("punct_paren_open2"))
 					punct_paren_open2 = value;
-				else if (key == "punct_paren_close1")
+				else if (key.equals("punct_paren_close1"))
 					punct_paren_close1 = value;
-				else if (key == "punct_paren_close2")
+				else if (key.equals("punct_paren_close2"))
 					punct_paren_close2 = value;
-				else if (key == "punct_weak")
+				else if (key.equals("punct_weak"))
 					punct_weak = value;
-				else if (key == "entity")
+				else if (key.equals("entity"))
 					entity = value;
-				else if (key == "seg_tags")
+				else if (key.equals("seg_tags"))
 					seg_tags = value;
-				else if (key == "regPunct")
+				else if (key.equals("regPunct"))
 					regPunct = value;
-				else if (key == "regElision")
+				else if (key.equals("regElision"))
 					regElision = value;
-				else if (key == "whitespaces")
+				else if (key.equals("whitespaces"))
 					whitespaces = value;
-				else if (key == "punct_strong") // this is temporary
+				else if (key.equals("punct_strong")) // this is temporary
 					tmp_strong_punct = value; // this is temporary
-				else
-					System.out.println("MISSING TOKENIZER KEY: "+key);
+//				else
+//					System.out.println("MISSING TOKENIZER KEY: "+key);
 			}
 
 			//recombine
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 1176)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/TokenizerSection.java	(revision 1177)
@@ -303,7 +303,7 @@
 		textPunctsStrong.setText(project.getTokenizerParameter("punct_strong", TokenizerClasses.punct_strong));
 		textElisions.setText(project.getTokenizerParameter("regElision", TokenizerClasses.regElision));
 
-		String wtagElement = project.getTokenizerParameter("wordelement", "w");
+		String wtagElement = project.getTokenizerWordElement();
 		wordElementText.setText(wtagElement);
 
 		boolean doTokenizeStep = project.getDoTokenizerStep();
@@ -327,7 +327,7 @@
 		project.addTokenizerParameter("regPunct", textPuncts.getText()); //$NON-NLS-1$
 		project.addTokenizerParameter("punct_strong", textPunctsStrong.getText()); //$NON-NLS-1$
 		project.addTokenizerParameter("regElision", textElisions.getText()); //$NON-NLS-1$
-		project.addTokenizerParameter("wordelement", wordElementText.getText()); //$NON-NLS-1$
+		project.addTokenizerParameter("word_tags", wordElementText.getText()); //$NON-NLS-1$
 		project.addTokenizerParameter("doTokenizeStep", ""+doTokenizeStepButton.getSelection()); //$NON-NLS-1$
 		project.addTokenizerParameter("onlyThoseTests", "false"); //$NON-NLS-1$
 		//project.setTokenizerAdditionalTests(additionalTokenizerTests); //$NON-NLS-1$
