Index: tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java
===================================================================
--- tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java	(revision 408)
+++ tmp/org.txm.cah.core/src/org/txm/cah/core/functions/CAH.java	(revision 409)
@@ -33,8 +33,10 @@
 import org.rosuda.REngine.REXPMismatchException;
 import org.txm.ca.core.functions.CA;
 import org.txm.cah.core.messages.CAHCoreMessages;
-import org.txm.core.results.ITXMResult;
-import org.txm.functions.Function;
+import org.txm.cah.core.preferences.CAHPreferences;
+import org.txm.core.preferences.TXMPreferences;
+import org.txm.functions.ProgressWatcher;
+import org.txm.functions.TXMCommand;
 import org.txm.lexicaltable.core.functions.LexicalTable;
 import org.txm.searchengine.cqp.corpus.Corpus;
 import org.txm.searchengine.cqp.corpus.Partition;
@@ -49,7 +51,7 @@
  * @author sjacquot
  *
  */
-public class CAH extends Function implements ITXMResult	{
+public class CAH extends TXMCommand	{
 	/** The metric. */
 	String metric = "euclidean"; // euclidean, manhattan //$NON-NLS-1$
 
@@ -214,12 +216,8 @@
 	/** The nocah. */
 	protected static int nocah = 1;
 
-	/**
-	 * Step compute.
-	 *
-	 */
-	public void stepCompute()
-	{
+	@Override
+	public boolean compute(ProgressWatcher watcher)	{
 		
 		Log.info("Computing CAH...");
 		try {
@@ -258,10 +256,17 @@
 		catch(RWorkspaceException e) {
 			System.out.println("Failed to compute CAH: "+e);
 			Log.printStackTrace(e);
+			return false;
 		}
 
+		// FIXME: persistence
+		TXMPreferences.putLocalInt(this, CAHPreferences.N_CLUSTERS, this.NCluster);
+		TXMPreferences.putLocalBoolean(this, CAHPreferences.COLUMNS_COMPUTING, this.columns);
+
+		
 		// Reset the cached data
 		this.resetCache();
+		return true;
 	}
 
 	/**
@@ -636,7 +641,7 @@
 	
 	@Override
 	public String getName() {
-		return this.parent.getName();
+		return "TODO : getName(), etc.";
 	}
 
 	
Index: tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/jfreechart/JFCCAHChartCreator.java
===================================================================
--- tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/jfreechart/JFCCAHChartCreator.java	(revision 408)
+++ tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/jfreechart/JFCCAHChartCreator.java	(revision 409)
@@ -2,7 +2,7 @@
 
 import org.jfree.chart.JFreeChart;
 import org.txm.cah.core.functions.CAH;
-import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
 import org.txm.chartsengine.jfreechart.core.JFCChartCreator;
 
 /**
@@ -20,7 +20,7 @@
 	}
 
 	@Override
-	public JFreeChart createChart(ITXMResult result, String preferencesNode) {
+	public JFreeChart createChart(TXMResult result) {
 
 		System.err.println("JFCCAHChartCreator.createChart(): not yet implemented.");
 		
Index: tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/r/RCAHChartCreator.java
===================================================================
--- tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/r/RCAHChartCreator.java	(revision 408)
+++ tmp/org.txm.cah.core/src/org/txm/cah/core/chartsengine/r/RCAHChartCreator.java	(revision 409)
@@ -5,7 +5,7 @@
 import org.txm.cah.core.functions.CAH;
 import org.txm.cah.core.preferences.CAHPreferences;
 import org.txm.core.preferences.TXMPreferences;
-import org.txm.core.results.ITXMResult;
+import org.txm.core.results.TXMResult;
 import org.txm.chartsengine.r.core.RChartCreator;
 
 /**
@@ -22,20 +22,20 @@
 	}
 
 	@Override
-	public Object createChart(ITXMResult result, String preferencesNode) {
+	public Object createChart(TXMResult result) {
 		// TODO Auto-generated method stub
 		return null;
 	}
 	
 
 	@Override
-	public File createChartFile(ITXMResult result, File file, String preferencesNode) {
+	public File createChartFile(TXMResult result, File file) {
 
 		CAH cah = (CAH) result;
 		
 		String cmd = null;
 		// 2D
-		if (TXMPreferences.getBoolean(preferencesNode, result, CAHPreferences.DISPLAY_2D)) {
+		if (result.getBooleanParameterValue(CAHPreferences.DISPLAY_2D)) {
 			cmd = "plot.HCPC(" + cah.getSymbol() + ", new.plot=FALSE, choice=\"tree\")";
 			
 		// FIXME: for tests without drawing the inertia barplot. Without it, the max available clusters can exceed 16
