Index: trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.SantaFe/3.3/Symbols/Prog3.cs	(revision 2700)
@@ -21,5 +21,5 @@
 
 namespace HeuristicLab.GP.SantaFe {
-  public sealed class Prog3 : FunctionBase {
+  public sealed class Prog3 : Function {
 
     public Prog3()
Index: trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenAddition.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenAddition.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenAddition.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification.Networks {
-  public sealed class OpenAddition : FunctionBase {
+  public sealed class OpenAddition : Function {
     public override string Description {
       get { return "Unbound +."; }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenDivision.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenDivision.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenDivision.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification.Networks {
-  public sealed class OpenDivision : FunctionBase {
+  public sealed class OpenDivision : Function {
     public override string Description {
       get { return "Unbound /."; }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenMultiplication.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenMultiplication.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenMultiplication.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification.Networks {
-  public sealed class OpenMultiplication : FunctionBase {
+  public sealed class OpenMultiplication : Function {
     public override string Description {
       get { return "Unbound *."; }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenSubtraction.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenSubtraction.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification.Networks/3.2/Symbols/OpenSubtraction.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification.Networks {
-  public sealed class OpenSubtraction : FunctionBase {
+  public sealed class OpenSubtraction : Function {
     public override string Description {
       get { return "Unbound -."; }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/FunctionTreeBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2700)
@@ -27,5 +27,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public class FunctionTreeBase : HeuristicLab.GP.FunctionTreeBase {
+  public class FunctionTreeBase : HeuristicLab.GP.FunctionTree {
     public FunctionTreeBase(IFunction function) : base(function) { }
     public FunctionTreeBase(FunctionTreeBase original) : base(original) { }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Addition.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Addition : FunctionBase {
+  public sealed class Addition : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/And.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class And : FunctionBase {
+  public sealed class And : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Average.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Average : FunctionBase {
+  public sealed class Average : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Division.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Division : FunctionBase {
+  public sealed class Division : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/IfThenElse.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class IfThenElse : FunctionBase {
+  public sealed class IfThenElse : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Multiplication.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Multiplication : FunctionBase {
+  public sealed class Multiplication : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Or.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Or : FunctionBase {
+  public sealed class Or : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Symbols/Subtraction.cs	(revision 2700)
@@ -22,5 +22,5 @@
 
 namespace HeuristicLab.GP.StructureIdentification {
-  public sealed class Subtraction : FunctionBase {
+  public sealed class Subtraction : Function {
     public override string Description {
       get {
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/BinaryFunction.cs	(revision 2700)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.GP {
-  public abstract class BinaryFunction : FunctionBase {
+  public abstract class BinaryFunction : Function {
     public BinaryFunction()
       : base() {
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs	(revision 2700)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Function.cs	(revision 2700)
@@ -0,0 +1,280 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using System.Diagnostics;
+using HeuristicLab.GP.Interfaces;
+using System.Linq;
+
+namespace HeuristicLab.GP {
+  public abstract class Function : ItemBase, IFunction {
+    private List<List<IFunction>> allowedSubFunctions = new List<List<IFunction>>();
+    private int minArity = -1;
+    private int maxArity = -1;
+    private double tickets = 1.0;
+    private IOperator initializer;
+    private IOperator manipulator;
+    private int minTreeHeight = -1;
+    private int minTreeSize = -1;
+
+    private string name;
+    public virtual string Name {
+      get { return name; }
+      set {
+        if (string.IsNullOrEmpty(value)) throw new ArgumentException();
+        if (value != name) {
+          name = value;
+          FireChanged();
+        }
+      }
+    }
+
+    protected Function() {
+      name = this.GetType().Name;
+    }
+
+    public virtual string Description {
+      get { return "Description for this function is missing (TODO)"; }
+    }
+
+    public int MinSubTrees {
+      get {
+        return minArity;
+      }
+      protected internal set {
+        if (value < 0) throw new ArgumentException();
+        if (minArity != value) {
+          minArity = value;
+          while (minArity > allowedSubFunctions.Count) allowedSubFunctions.Add(new List<IFunction>());
+          ResetCachedValues();
+          FireChanged();
+        }
+      }
+    }
+
+    public int MaxSubTrees {
+      get {
+        return maxArity;
+      }
+      protected internal set {
+        if (value < 0) throw new ArgumentException();
+        if (value < minArity) throw new ArgumentException();
+        if (value != maxArity) {
+          maxArity = value;
+          while (allowedSubFunctions.Count > maxArity) allowedSubFunctions.RemoveAt(allowedSubFunctions.Count - 1);
+          while (maxArity > allowedSubFunctions.Count) {
+            if (allowedSubFunctions.Count > 0) {
+              // copy the list of allowed sub-functions from the previous slot
+              allowedSubFunctions.Add(new List<IFunction>(allowedSubFunctions[allowedSubFunctions.Count - 1]));
+            } else {
+              // add empty list
+              allowedSubFunctions.Add(new List<IFunction>());
+            }
+          }
+          ResetCachedValues();
+          FireChanged();
+        }
+      }
+    }
+
+
+    public int MinTreeSize {
+      get {
+        if (minTreeSize <= 0) {
+          RecalculateMinimalTreeSize();
+          FireChanged();
+        }
+        Debug.Assert(minTreeSize > 0);
+        return minTreeSize;
+      }
+    }
+
+    public int MinTreeHeight {
+      get {
+        if (minTreeHeight <= 0) {
+          RecalculateMinimalTreeHeight();
+          FireChanged();
+        }
+        Debug.Assert(minTreeHeight > 0);
+        return minTreeHeight;
+      }
+    }
+
+    public double Tickets {
+      get { return tickets; }
+      set {
+        if (value < 0.0) throw new ArgumentException("Number of tickets must be positive");
+        if (value != tickets) {
+          tickets = value;
+          FireChanged();
+        }
+      }
+    }
+
+    public IOperator Initializer {
+      get { return initializer; }
+      set {
+        if (initializer != value) {
+          initializer = value;
+          FireChanged();
+        }
+      }
+    }
+
+    public IOperator Manipulator {
+      get { return manipulator; }
+      set {
+        if (manipulator != value) {
+          manipulator = value;
+          FireChanged();
+        }
+      }
+    }
+
+    public virtual IFunctionTree GetTreeNode() {
+      return new FunctionTree(this);
+    }
+
+    public ICollection<IFunction> GetAllowedSubFunctions(int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      return allowedSubFunctions[index];
+    }
+
+    public void AddAllowedSubFunction(IFunction function, int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      if (allowedSubFunctions[index] == null) {
+        allowedSubFunctions[index] = new List<IFunction>();
+      }
+      if (!allowedSubFunctions[index].Contains(function)) {
+        allowedSubFunctions[index].Add(function);
+      }
+      ResetCachedValues();
+      FireChanged();
+    }
+    public void RemoveAllowedSubFunction(IFunction function, int index) {
+      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
+      if (allowedSubFunctions[index].Contains(function)) {
+        allowedSubFunctions[index].Remove(function);
+        ResetCachedValues();
+        FireChanged();
+      }
+    }
+
+    private void ResetCachedValues() {
+      minTreeHeight = -1;
+      minTreeSize = -1;
+    }
+
+    public bool IsAllowedSubFunction(IFunction function, int index) {
+      return GetAllowedSubFunctions(index).Contains(function);
+    }
+
+    private void RecalculateMinimalTreeSize() {
+      if (MinSubTrees == 0) minTreeSize = 1;
+      else {
+        minTreeSize = int.MaxValue; // prevent infinite recursion        
+        minTreeSize = 1 + (from slot in Enumerable.Range(0, MinSubTrees)
+                           let minForSlot = (from function in GetAllowedSubFunctions(slot)
+                                             where function != this
+                                             select function.MinTreeSize).DefaultIfEmpty(0).Min()
+                           select minForSlot).Sum();
+      }
+    }
+
+    private void RecalculateMinimalTreeHeight() {
+      if (MinSubTrees == 0) minTreeHeight = 1;
+      else {
+        minTreeHeight = int.MaxValue;
+        minTreeHeight = 1 + (from slot in Enumerable.Range(0, MinSubTrees)
+                             let minForSlot = (from function in GetAllowedSubFunctions(slot)
+                                               where function != this
+                                               select function.MinTreeHeight).DefaultIfEmpty(0).Min()
+                             select minForSlot).Max();
+      }
+    }
+
+    public override IView CreateView() {
+      return new FunctionView(this);
+    }
+
+    public override string ToString() {
+      return name;
+    }
+
+    #region persistence
+    public override object Clone(IDictionary<Guid, object> clonedObjects) {
+      Function clone = (Function)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;
+    }
+
+    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
+      XmlAttribute minSubTreesAttr = document.CreateAttribute("MinSubTrees");
+      minSubTreesAttr.Value = XmlConvert.ToString(MinSubTrees);
+      XmlAttribute maxSubTreesAttr = document.CreateAttribute("MaxSubTrees");
+      maxSubTreesAttr.Value = XmlConvert.ToString(MaxSubTrees);
+      node.Attributes.Append(minSubTreesAttr);
+      node.Attributes.Append(maxSubTreesAttr);
+      for (int i = 0; i < MaxSubTrees; i++) {
+        XmlNode slotNode = document.CreateElement("AllowedSubFunctions");
+        XmlAttribute slotAttr = document.CreateAttribute("Slot");
+        slotAttr.Value = XmlConvert.ToString(i);
+        slotNode.Attributes.Append(slotAttr);
+        node.AppendChild(slotNode);
+        foreach (IFunction f in GetAllowedSubFunctions(i)) {
+          slotNode.AppendChild(PersistenceManager.Persist(f, document, persistedObjects));
+        }
+      }
+      return node;
+    }
+
+    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+      base.Populate(node, restoredObjects);
+      MinSubTrees = XmlConvert.ToInt32(node.Attributes["MinSubTrees"].Value);
+      MaxSubTrees = XmlConvert.ToInt32(node.Attributes["MaxSubTrees"].Value);
+      foreach (XmlNode allowedSubFunctionsNode in node.SelectNodes("AllowedSubFunctions")) {
+        int slot = XmlConvert.ToInt32(allowedSubFunctionsNode.Attributes["Slot"].Value);
+        foreach (XmlNode fNode in allowedSubFunctionsNode.ChildNodes) {
+          AddAllowedSubFunction((IFunction)PersistenceManager.Restore(fNode, restoredObjects), slot);
+        }
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionBase.cs	(revision 2699)
+++ 	(revision )
@@ -1,210 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using System.Xml;
-using System.Diagnostics;
-using HeuristicLab.GP.Interfaces;
-using System.Linq;
-
-namespace HeuristicLab.GP {
-  public abstract class FunctionBase : ItemBase, IFunction {
-    private List<List<IFunction>> allowedSubFunctions = new List<List<IFunction>>();
-    private int minArity = -1;
-    private int maxArity = -1;
-    private double tickets = 1.0;
-    private IOperator initializer;
-    private IOperator manipulator;
-    private int minTreeHeight = -1;
-    private int minTreeSize = -1;
-
-    public virtual string Name {
-      get { return this.GetType().Name; }
-    }
-
-    public virtual string Description {
-      get { return "Description for this function is missing (TODO)"; }
-    }
-
-    public int MinSubTrees {
-      get {
-        return minArity;
-      }
-      protected set {
-        minArity = value;
-        while (minArity > allowedSubFunctions.Count) allowedSubFunctions.Add(new List<IFunction>());
-      }
-    }
-
-    public int MaxSubTrees {
-      get {
-        return maxArity;
-      }
-      protected set {
-        maxArity = value;
-        while (allowedSubFunctions.Count > maxArity) allowedSubFunctions.RemoveAt(allowedSubFunctions.Count - 1);
-        while (maxArity > allowedSubFunctions.Count) allowedSubFunctions.Add(new List<IFunction>());
-      }
-    }
-
-
-    public int MinTreeSize {
-      get {
-        if (minTreeSize <= 0) RecalculateMinimalTreeSize();
-        Debug.Assert(minTreeSize > 0);
-        return minTreeSize;
-      }
-    }
-
-    public int MinTreeHeight {
-      get {
-        if (minTreeHeight <= 0) RecalculateMinimalTreeHeight();
-        Debug.Assert(minTreeHeight > 0);
-        return minTreeHeight;
-      }
-    }
-
-    public double Tickets {
-      get { return tickets; }
-      set {
-        if (value < 0.0) throw new ArgumentException("Number of tickets must be positive");
-        else tickets = value;
-      }
-    }
-
-    public IOperator Initializer {
-      get { return initializer; }
-      set { initializer = value; }
-    }
-
-    public IOperator Manipulator {
-      get { return manipulator; }
-      set { manipulator = value; }
-    }
-
-    public virtual IFunctionTree GetTreeNode() {
-      return new FunctionTreeBase(this);
-    }
-
-    public ICollection<IFunction> GetAllowedSubFunctions(int index) {
-      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
-      return allowedSubFunctions[index];
-    }
-
-    public void AddAllowedSubFunction(IFunction function, int index) {
-      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
-      if (allowedSubFunctions[index] == null) {
-        allowedSubFunctions[index] = new List<IFunction>();
-      }
-      if (!allowedSubFunctions[index].Contains(function)) {
-        allowedSubFunctions[index].Add(function);
-      }
-    }
-
-    public void RemoveAllowedSubFunction(IFunction function, int index) {
-      if (index < 0 || index > MaxSubTrees) throw new ArgumentException("Index outside of allowed range. index = " + index);
-      allowedSubFunctions[index].Add(function);
-    }
-
-    public bool IsAllowedSubFunction(IFunction function, int index) {
-      return GetAllowedSubFunctions(index).Contains(function);
-    }
-
-    private void RecalculateMinimalTreeSize() {
-      if (MinSubTrees == 0) minTreeSize = 1;
-      else {
-        minTreeSize = int.MaxValue; // prevent infinite recursion
-        minTreeSize = 1 + (from slot in Enumerable.Range(0, MinSubTrees)
-                           let minForSlot = (from function in GetAllowedSubFunctions(slot)
-                                             where function != this
-                                             select function.MinTreeSize).Min()
-                           select minForSlot).Sum();
-      }
-    }
-
-    private void RecalculateMinimalTreeHeight() {
-      if (MinSubTrees == 0) minTreeHeight = 1;
-      else {
-        minTreeHeight = int.MaxValue;
-        minTreeHeight = 1 + (from slot in Enumerable.Range(0, MinSubTrees)
-                             let minForSlot = (from function in GetAllowedSubFunctions(slot)
-                                               where function != this
-                                               select function.MinTreeHeight).Min()
-                             select minForSlot).Max();
-      }
-    }
-
-    public override object Clone(IDictionary<Guid, object> clonedObjects) {
-      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;
-    }
-
-    public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
-      XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlAttribute minSubTreesAttr = document.CreateAttribute("MinSubTrees");
-      minSubTreesAttr.Value = XmlConvert.ToString(MinSubTrees);
-      XmlAttribute maxSubTreesAttr = document.CreateAttribute("MaxSubTrees");
-      maxSubTreesAttr.Value = XmlConvert.ToString(MaxSubTrees);
-      node.Attributes.Append(minSubTreesAttr);
-      node.Attributes.Append(maxSubTreesAttr);
-      for (int i = 0; i < MaxSubTrees; i++) {
-        XmlNode slotNode = document.CreateElement("AllowedSubFunctions");
-        XmlAttribute slotAttr = document.CreateAttribute("Slot");
-        slotAttr.Value = XmlConvert.ToString(i);
-        slotNode.Attributes.Append(slotAttr);
-        node.AppendChild(slotNode);
-        foreach (IFunction f in GetAllowedSubFunctions(i)) {
-          slotNode.AppendChild(PersistenceManager.Persist(f, document, persistedObjects));
-        }
-      }
-      return node;
-    }
-
-    public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-      base.Populate(node, restoredObjects);
-      MinSubTrees = XmlConvert.ToInt32(node.Attributes["MinSubTrees"].Value);
-      MaxSubTrees = XmlConvert.ToInt32(node.Attributes["MaxSubTrees"].Value);
-      foreach (XmlNode allowedSubFunctionsNode in node.SelectNodes("AllowedSubFunctions")) {
-        int slot = XmlConvert.ToInt32(allowedSubFunctionsNode.Attributes["Slot"].Value);
-        foreach (XmlNode fNode in allowedSubFunctionsNode.ChildNodes) {
-          AddAllowedSubFunction((IFunction)PersistenceManager.Restore(fNode, restoredObjects), slot);
-        }
-      }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTree.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTree.cs	(revision 2700)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTree.cs	(revision 2700)
@@ -0,0 +1,125 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.GP.Interfaces;
+using System.Xml;
+
+namespace HeuristicLab.GP {
+  public class FunctionTree : IFunctionTree {
+    private List<IFunctionTree> subTrees;
+    private IFunction function;
+
+    public FunctionTree() {
+    }
+
+    public FunctionTree(IFunction function) {
+      subTrees = new List<IFunctionTree>();
+      this.function = function;
+    }
+
+    protected FunctionTree(FunctionTree original) {
+      this.function = original.Function;
+      this.subTrees = new List<IFunctionTree>(original.SubTrees.Count);
+      foreach (IFunctionTree originalSubTree in original.SubTrees) {
+        this.SubTrees.Add((IFunctionTree)originalSubTree.Clone());
+      }
+    }
+
+    #region IFunctionTree Members
+    public virtual bool HasLocalParameters {
+      get { return false; }
+    }
+
+    public virtual IList<IFunctionTree> SubTrees {
+      get { return subTrees; }
+    }
+
+    public IFunction Function {
+      get { return function; }
+      protected set { function = value; }
+    }
+
+    public int GetSize() {
+      int size = 1;
+      foreach (IFunctionTree tree in SubTrees) size += tree.GetSize();
+      return size;
+    }
+
+    public int GetHeight() {
+      int maxHeight = 0;
+      foreach (IFunctionTree tree in SubTrees) maxHeight = Math.Max(maxHeight, tree.GetHeight());
+      return maxHeight + 1;
+    }
+
+    public virtual IOperation CreateShakingOperation(IScope scope) {
+      return null;
+    }
+
+    public virtual IOperation CreateInitOperation(IScope scope) {
+      return null;
+    }
+
+    public void AddSubTree(IFunctionTree tree) {
+      SubTrees.Add(tree);
+    }
+
+    public virtual void InsertSubTree(int index, IFunctionTree tree) {
+      SubTrees.Insert(index, tree);
+    }
+
+    public virtual void RemoveSubTree(int index) {
+      SubTrees.RemoveAt(index);
+    }
+
+    public override string ToString() {
+      return Function.Name;
+    }
+
+    #endregion
+
+    #region IStorable Members
+
+    public Guid Guid {
+      get { throw new NotSupportedException(); }
+    }
+
+    public virtual object Clone() {
+      return new FunctionTree(this);
+    }
+
+    public object Clone(IDictionary<Guid, object> clonedObjects) {
+      throw new NotImplementedException();
+    }
+
+    public virtual XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
+      return null;
+    }
+
+    public virtual void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/FunctionTreeBase.cs	(revision 2699)
+++ 	(revision )
@@ -1,125 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.GP.Interfaces;
-using System.Xml;
-
-namespace HeuristicLab.GP {
-  public class FunctionTreeBase : IFunctionTree {
-    private List<IFunctionTree> subTrees;
-    private IFunction function;
-
-    public FunctionTreeBase() {
-    }
-
-    public FunctionTreeBase(IFunction function) {
-      subTrees = new List<IFunctionTree>();
-      this.function = function;
-    }
-
-    protected FunctionTreeBase(FunctionTreeBase original) {
-      this.function = original.Function;
-      this.subTrees = new List<IFunctionTree>(original.SubTrees.Count);
-      foreach (IFunctionTree originalSubTree in original.SubTrees) {
-        this.SubTrees.Add((IFunctionTree)originalSubTree.Clone());
-      }
-    }
-
-    #region IFunctionTree Members
-    public virtual bool HasLocalParameters {
-      get { return false; }
-    }
-
-    public virtual IList<IFunctionTree> SubTrees {
-      get { return subTrees; }
-    }
-
-    public IFunction Function {
-      get { return function; }
-      protected set { function = value; }
-    }
-
-    public int GetSize() {
-      int size = 1;
-      foreach (IFunctionTree tree in SubTrees) size += tree.GetSize();
-      return size;
-    }
-
-    public int GetHeight() {
-      int maxHeight = 0;
-      foreach (IFunctionTree tree in SubTrees) maxHeight = Math.Max(maxHeight, tree.GetHeight());
-      return maxHeight + 1;
-    }
-
-    public virtual IOperation CreateShakingOperation(IScope scope) {
-      return null;
-    }
-
-    public virtual IOperation CreateInitOperation(IScope scope) {
-      return null;
-    }
-
-    public void AddSubTree(IFunctionTree tree) {
-      SubTrees.Add(tree);
-    }
-
-    public virtual void InsertSubTree(int index, IFunctionTree tree) {
-      SubTrees.Insert(index, tree);
-    }
-
-    public virtual void RemoveSubTree(int index) {
-      SubTrees.RemoveAt(index);
-    }
-
-    public override string ToString() {
-      return Function.Name;
-    }
-
-    #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) {
-      return null;
-    }
-
-    public virtual void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/Terminal.cs	(revision 2700)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.GP {
-  public abstract class Terminal : FunctionBase {
+  public abstract class Terminal : Function {
     public Terminal()
       : base() {
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/TerminalTreeNode.cs	(revision 2700)
@@ -27,5 +27,5 @@
 
 namespace HeuristicLab.GP {
-  public class TerminalTreeNode : FunctionTreeBase {
+  public class TerminalTreeNode : FunctionTree {
     private static readonly IList<IFunctionTree> subTrees = new List<IFunctionTree>().AsReadOnly();
     public TerminalTreeNode(IFunction function) {
Index: trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs
===================================================================
--- trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs	(revision 2699)
+++ trunk/sources/HeuristicLab.GP/3.3/BaseClasses/UnaryFunction.cs	(revision 2700)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.GP {
-  public abstract class UnaryFunction : FunctionBase {
+  public abstract class UnaryFunction : Function {
     public UnaryFunction()
       : base() {
