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 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.Boolean/3.3/Symbols/VariableFunctionTree.cs	(revision 2219)
@@ -64,5 +64,5 @@
 
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlNode node = document.CreateElement(name);
       XmlAttribute varAttr = document.CreateAttribute("Variable");
       varAttr.Value = VariableName;
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 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/ConstantFunctionTree.cs	(revision 2219)
@@ -62,5 +62,5 @@
 
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlNode node = document.CreateElement(name);
       XmlAttribute valueAttr = document.CreateAttribute("Value");
       valueAttr.Value = XmlConvert.ToString(Value);
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 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/VariableFunctionTree.cs	(revision 2219)
@@ -72,5 +72,5 @@
 
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<System.Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlNode node = document.CreateElement(name);
       XmlAttribute weightAttr = document.CreateAttribute("Weight");
       weightAttr.Value = XmlConvert.ToString(Weight);
Index: branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs
===================================================================
--- branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs	(revision 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs	(revision 2219)
@@ -156,5 +156,20 @@
 
     public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      throw new NotSupportedException();
+      FunctionBase clone = (FunctionBase)base.Clone(clonedObjects);
+      clone.initializer = (IOperator)Auxiliary.Clone(initializer, clonedObjects);
+      clone.manipulator = (IOperator)Auxiliary.Clone(manipulator, clonedObjects);
+      clone.maxArity = maxArity;
+      clone.minArity = minArity;
+      clone.minTreeHeight = minTreeHeight;
+      clone.minTreeSize = minTreeSize;
+      clone.tickets = tickets;
+      for (int i = 0; i < MaxSubTrees; i++) {
+        var allowedSubFunctionsForSlot = new List<IFunction>();
+        foreach (IFunction f in GetAllowedSubFunctions(i)) {
+          allowedSubFunctionsForSlot.Add((IFunction)Auxiliary.Clone(f, clonedObjects));
+        }
+        clone.allowedSubFunctions.Add(allowedSubFunctionsForSlot);
+      }
+      return clone;
     }
 
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 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2219)
@@ -111,24 +111,8 @@
 
     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;
+      return null;
     }
 
     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 2218)
+++ branches/GP-Refactoring-713/sources/HeuristicLab.GP/3.3/GeneticProgrammingModel.cs	(revision 2219)
@@ -59,14 +59,38 @@
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      node.AppendChild(PersistenceManager.Persist("Function", FunctionTree.Function, document, persistedObjects));
-      node.AppendChild(FunctionTree.GetXmlNode("FunctionTree", document, persistedObjects));
+      PersistTree(node, document, persistedObjects, FunctionTree);
       return node;
+    }
+
+    private void PersistTree(XmlNode node, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects, IFunctionTree tree) {
+      XmlNode fNode = PersistenceManager.Persist(tree.Function, document, persistedObjects);
+      XmlAttribute subTreesAttr = document.CreateAttribute("Args");
+      subTreesAttr.Value = XmlConvert.ToString(tree.SubTrees.Count);
+      fNode.Attributes.Append(subTreesAttr);
+      node.AppendChild(fNode);
+      XmlNode treeNode = tree.GetXmlNode("Data", document, persistedObjects);
+      if (treeNode != null) fNode.AppendChild(treeNode);
+      foreach (IFunctionTree subTree in tree.SubTrees) {
+        PersistTree(node, document, persistedObjects, subTree);
+      }
     }
 
     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
       base.Populate(node, restoredObjects);
-      IFunction rootFunction = (IFunction)PersistenceManager.Restore(node.SelectSingleNode("Function"), restoredObjects);
-      IFunctionTree rootNode = rootFunction.GetTreeNode();
-      rootNode.Populate(node.SelectSingleNode("FunctionTree"), restoredObjects);
+      int nodeIndex = 0;
+      FunctionTree = RestoreTree(node, ref nodeIndex, restoredObjects);
+    }
+
+    private IFunctionTree RestoreTree(XmlNode node, ref int nodeIndex, IDictionary<Guid, IStorable> restoredObjects) {
+      XmlNode fNode = node.ChildNodes[nodeIndex];
+      int subTrees = XmlConvert.ToInt32(fNode.Attributes["Args"].Value);
+      IFunction f = (IFunction)PersistenceManager.Restore(fNode, restoredObjects);
+      IFunctionTree tree = f.GetTreeNode();
+      if(fNode.ChildNodes.Count>0) tree.Populate(fNode.ChildNodes[0], restoredObjects);
+      nodeIndex++;
+      for (int i = 0; i < subTrees; i++) {
+        tree.AddSubTree(RestoreTree(node, ref nodeIndex, restoredObjects));
+      }
+      return tree;
     }
 
