Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs	(revision 2218)
@@ -24,4 +24,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.GP.Interfaces;
+using System.Xml;
 
 namespace HeuristicLab.GP.Boolean {
@@ -58,6 +59,19 @@
     }
 
-    public override IFunctionTree Clone() {
+    public override object Clone() {
       return new VariableFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlAttribute varAttr = document.CreateAttribute("Variable");
+      varAttr.Value = VariableName;
+      node.Attributes.Append(varAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      VariableName = node.Attributes["Variable"].Value;
     }
 
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/HeuristicLab.GP.Interfaces-3.3.csproj	(revision 2218)
@@ -83,5 +83,7 @@
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="IFunctionTreeSerializer.cs" />
+    <Compile Include="IFunctionTreeSerializer.cs">
+      <SubType>Code</SubType>
+    </Compile>
     <Compile Include="IGeneticProgrammingModel.cs" />
     <Compile Include="HeuristicLabGPInterfacesPlugin.cs" />
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTree.cs	(revision 2218)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.GP.Interfaces {
-  public interface IFunctionTree {
+  public interface IFunctionTree : IStorable {
     bool HasLocalParameters { get; }
     IList<IFunctionTree> SubTrees { get; }
@@ -37,5 +37,4 @@
     void InsertSubTree(int index, IFunctionTree tree);
     void RemoveSubTree(int index);
-    IFunctionTree Clone();
   }
 }
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Interfaces/3.3/IFunctionTreeSerializer.cs	(revision 2218)
@@ -30,6 +30,6 @@
     string Export(IFunctionTree tree);
     bool TryExport(IFunctionTree tree, out string exported);
-    IFunctionTree Import(string tree);
-    bool TryImport(string tree, out IFunctionTree importedTree);
+    //IFunctionTree Import(string tree);
+    //bool TryImport(string tree, out IFunctionTree importedTree);
   }
 }
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/HeuristicLab.GP.Operators-3.3.csproj	(revision 2218)
@@ -10,5 +10,5 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>HeuristicLab.GP.Operators</RootNamespace>
-    <AssemblyName>HeuristicLab.GP.Operators</AssemblyName>
+    <AssemblyName>HeuristicLab.GP.Operators-3.3</AssemblyName>
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/SymbolicExpressionExporter.cs	(revision 2218)
@@ -54,53 +54,81 @@
     }
 
-    public IFunctionTree Import(string tree) {
-      Queue<string> tokens = new Queue<string>(tree.Split(' ', '\n', '\t'));
-      return ParseTree(tokens);
-    }
-
-    private IFunctionTree ParseTree(Queue<string> tokens) {
-      Expect("(", tokens);
-      string funSymb = tokens.Peek();
-      double constValue;
-      if (double.TryParse(funSymb, out constValue)) {
-        throw new UnknownFunctionException(funSymb);
-      }
-      switch (funSymb) {
-        case "variable": return ParseVariable(tokens);
-        case "differential": return ParseDifferential(tokens);
-        default: 
-          IFunctionTree fNode = ParseFunction(tokens);
-          Expect(")", tokens);
-          return fNode;
-      }
-
-    }
-
-    private IFunctionTree ParseFunction(Queue<string> tokens) {
-      throw new UnknownFunctionException(tokens.Dequeue());
-    }
-
-    private IFunctionTree ParseDifferential(Queue<string> tokens) {
-      throw new UnknownFunctionException(tokens.Dequeue());
-    }
-
-    private IFunctionTree ParseVariable(Queue<string> tokens) {
-      throw new UnknownFunctionException(tokens.Dequeue());
-    }
-
-    private void Expect(string p, Queue<string> tokens) {
-      throw new NotImplementedException();
-    }
-
-    public bool TryImport(string tree, out IFunctionTree importedTree) {
-      try {
-        importedTree = Import(tree);
-        return true;
-      }
-      catch (UnknownFunctionException) {
-        importedTree = null;
-        return false;
-      }
-    }
+    //public IFunctionTree Import(string tree) {
+    //  Queue<string> tokens = new Queue<string>(tree.Split(' ', '\n', '\t'));
+    //  return ParseTree(tokens);
+    //}
+
+    //private IFunctionTree ParseTree(Queue<string> tokens) {
+    //  Expect("(", tokens);
+    //  string funSymb = tokens.Peek();
+    //  double constValue;
+    //  if (double.TryParse(funSymb, out constValue)) {
+    //    throw new UnknownFunctionException(funSymb);
+    //  }
+    //  switch (funSymb) {
+    //    case "variable": return ParseVariable(tokens);
+    //    case "differential": return ParseDifferential(tokens);
+    //    default: 
+    //      IFunctionTree fNode = ParseFunction(tokens);
+    //      Expect(")", tokens);
+    //      return fNode;
+    //  }
+
+    //}
+
+    //private IFunctionTree ParseFunction(Queue<string> tokens) {
+    //  string symb = tokens.Dequeue();
+    //  IFunctionTree funTree;
+    //  switch (symb) {
+    //    case "+": funTree = new Addition().GetTreeNode(); break;
+    //    case "-": funTree = new Subtraction().GetTreeNode(); break;
+    //    case "*": funTree = new Multiplication().GetTreeNode(); break;
+    //  }
+       
+    //  while (tokens.Peek() == "(") {
+    //    funTree.AddSubTree(ParseTree(tokens));
+    //  }
+    //  return funTree;
+    //}
+
+    //private IFunctionTree ParseDifferential(Queue<string> tokens) {
+    //  string symb = tokens.Dequeue();
+    //  double weight = double.Parse(tokens.Dequeue());
+    //  string name = tokens.Dequeue();
+    //  int sampleOffset = int.Parse(tokens.Dequeue());
+    //  VariableFunctionTree varFunTree = new Differential().GetTreeNode();
+    //  varFunTree.Weight = weight;
+    //  varFunTree.SampleOffset = sampleOffset;
+    //  varFunTree.VariableName = name;
+    //  return varFunTree;
+    //}
+
+    //private IFunctionTree ParseVariable(Queue<string> tokens) {
+    //  string symb = tokens.Dequeue();
+    //  double weight = double.Parse(tokens.Dequeue());
+    //  string name = tokens.Dequeue();
+    //  int sampleOffset = int.Parse(tokens.Dequeue());
+    //  VariableFunctionTree varFunTree = new Variable().GetTreeNode();
+    //  varFunTree.Weight = weight;
+    //  varFunTree.SampleOffset = sampleOffset;
+    //  varFunTree.VariableName = name;
+    //  return varFunTree;
+    //}
+
+    //private void Expect(string p, Queue<string> tokens) {
+    //  var next = tokens.Dequeue();
+    //  if (p != next) throw new FormatException("Expected symbol: " + p + ", found symbol: " + next);
+    //}
+
+    //public bool TryImport(string tree, out IFunctionTree importedTree) {
+    //  try {
+    //    importedTree = Import(tree);
+    //    return true;
+    //  }
+    //  catch (UnknownFunctionException) {
+    //    importedTree = null;
+    //    return false;
+    //  }
+    //}
 
     private void BuildExportString(IFunctionTree tree) {
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs	(revision 2218)
@@ -24,4 +24,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.GP.Interfaces;
+using System.Xml;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -56,6 +57,19 @@
     }
 
-    public override IFunctionTree Clone() {
+    public override object Clone() {
       return new ConstantFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlAttribute valueAttr = document.CreateAttribute("Value");
+      valueAttr.Value = XmlConvert.ToString(Value);
+      node.Attributes.Append(valueAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      Value = XmlConvert.ToDouble(node.Attributes["Value"].Value);
     }
 
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Differential.cs	(revision 2218)
@@ -21,4 +21,5 @@
 
 
+using HeuristicLab.GP.Interfaces;
 namespace HeuristicLab.GP.StructureIdentification {
   public sealed class Differential : Variable {
@@ -31,4 +32,8 @@
 
     public Differential() : base() { }
+
+    public override IFunctionTree GetTreeNode() {
+      return new VariableFunctionTree(this);
+    }
   }
 }
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Variable.cs	(revision 2218)
@@ -40,4 +40,5 @@
       }
     }
+
 
     public override IFunctionTree GetTreeNode() {
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs	(revision 2218)
@@ -24,4 +24,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.GP.Interfaces;
+using System.Xml;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -66,6 +67,27 @@
     }
 
-    public override IFunctionTree Clone() {
+    public override object Clone() {
       return new VariableFunctionTree(this);
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlAttribute weightAttr = document.CreateAttribute("Weight");
+      weightAttr.Value = XmlConvert.ToString(Weight);
+      XmlAttribute variableAttr = document.CreateAttribute("Variable");
+      variableAttr.Value = VariableName;
+      XmlAttribute sampleOffsetAttr = document.CreateAttribute("SampleOffset");
+      sampleOffsetAttr.Value = XmlConvert.ToString(SampleOffset);
+      node.Attributes.Append(weightAttr);
+      node.Attributes.Append(sampleOffsetAttr);
+      node.Attributes.Append(variableAttr);
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<System.Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      Weight = XmlConvert.ToDouble(node.Attributes["Weight"].Value);
+      SampleOffset = XmlConvert.ToInt32(node.Attributes["SampleOffset"].Value);
+      VariableName = node.Attributes["Variable"].Value;
     }
 
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2218)
@@ -25,4 +25,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.GP.Interfaces;
+using System.Xml;
 
 namespace HeuristicLab.GP {
@@ -43,5 +44,5 @@
       this.subTrees = new List<IFunctionTree>(original.SubTrees.Count);
       foreach (IFunctionTree originalSubTree in original.SubTrees) {
-        this.SubTrees.Add(originalSubTree.Clone());
+        this.SubTrees.Add((IFunctionTree)originalSubTree.Clone());
       }
     }
@@ -93,6 +94,41 @@
     }
 
-    public virtual IFunctionTree Clone() {
+    #endregion
+
+    #region IStorable Members
+
+    public Guid Guid {
+      get { throw new NotSupportedException(); }
+    }
+
+    public virtual object Clone() {
       return new FunctionTreeBase(this);
+    }
+
+    public object Clone(IDictionary<Guid, object> clonedObjects) {
+      throw new NotImplementedException();
+    }
+
+    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = document.CreateElement(name);
+      //XmlAttribute typeAttr = document.CreateAttribute("Type");
+      //typeAttr.Value = PersistenceManager.BuildTypeString(GetType());
+      //node.Attributes.Append(typeAttr);
+      foreach (IFunctionTree subTree in SubTrees) {
+        XmlNode funNode = PersistenceManager.Persist(Function, document, persistedObjects);
+        node.AppendChild(funNode);
+        funNode.AppendChild(subTree.GetXmlNode("Tree", document, persistedObjects));
+      }
+      return node;
+    }
+
+    public virtual void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      for (int i = 0; i < node.ChildNodes.Count; i++) {
+        XmlNode childNode = node.ChildNodes[i];
+        IFunction function = (IFunction)PersistenceManager.Restore(childNode, restoredObjects);
+        IFunctionTree tree = function.GetTreeNode();
+        tree.Populate(childNode.SelectSingleNode("Tree"), restoredObjects);
+        AddSubTree(tree);
+      }
     }
 
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs	(revision 2218)
@@ -53,5 +53,5 @@
     public override object Clone(IDictionary<Guid, object> clonedObjects) {
       GeneticProgrammingModel clone = (GeneticProgrammingModel)base.Clone(clonedObjects);
-      clone.FunctionTree = FunctionTree.Clone();
+      clone.FunctionTree = (IFunctionTree)FunctionTree.Clone();
       return clone;
     }
@@ -59,5 +59,6 @@
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      node.Value = GeneralTreeSerializer.Export(FunctionTree);
+      node.AppendChild(PersistenceManager.Persist("Function", FunctionTree.Function, document, persistedObjects));
+      node.AppendChild(FunctionTree.GetXmlNode("FunctionTree", document, persistedObjects));
       return node;
     }
@@ -65,5 +66,7 @@
     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
       base.Populate(node, restoredObjects);
-      FunctionTree = GeneralTreeSerializer.Import(node.Value);
+      IFunction rootFunction = (IFunction)PersistenceManager.Restore(node.SelectSingleNode("Function"), restoredObjects);
+      IFunctionTree rootNode = rootFunction.GetTreeNode();
+      rootNode.Populate(node.SelectSingleNode("FunctionTree"), restoredObjects);
     }
 
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj	(revision 2216)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/HeuristicLab.GP-3.3.csproj	(revision 2218)
@@ -89,5 +89,4 @@
     <Compile Include="BaseClasses\Terminal.cs" />
     <Compile Include="BaseClasses\UnaryFunction.cs" />
-    <Compile Include="FunctionTreeSerializer.cs" />
     <Compile Include="FunctionLibrary.cs" />
     <Compile Include="FunctionLibraryEditor.cs">
