Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/DefaultSymbolicExpressionGrammar.cs	(revision 3993)
@@ -63,9 +63,9 @@
       }
       set {
-        allowedChildSymbols = new Dictionary<string, List<HashSet<string>>>();
+        allowedChildSymbols = new Dictionary<string, List<List<string>>>();
         foreach (var pair in value) {
-          allowedChildSymbols[pair.Key] = new List<HashSet<string>>();
+          allowedChildSymbols[pair.Key] = new List<List<string>>();
           foreach (var entry in pair.Value) {
-            var hashSet = new HashSet<string>();
+            var hashSet = new List<string>();
             foreach (string child in entry) {
               hashSet.Add(child);
@@ -85,5 +85,5 @@
     private Dictionary<string, int> minSubTreeCount;
     private Dictionary<string, int> maxSubTreeCount;
-    private Dictionary<string, List<HashSet<string>>> allowedChildSymbols;
+    private Dictionary<string, List<List<string>>> allowedChildSymbols;
     private Dictionary<string, Symbol> allSymbols;
     [Storable]
@@ -92,12 +92,9 @@
     public DefaultSymbolicExpressionGrammar()
       : base() {
-      Clear();
-    }
-
-    public void Clear() {
       minSubTreeCount = new Dictionary<string, int>();
       maxSubTreeCount = new Dictionary<string, int>();
-      allowedChildSymbols = new Dictionary<string, List<HashSet<string>>>();
+      allowedChildSymbols = new Dictionary<string, List<List<string>>>();
       allSymbols = new Dictionary<string, Symbol>();
+
       cachedMinExpressionLength = new Dictionary<string, int>();
       cachedMaxExpressionLength = new Dictionary<string, int>();
@@ -110,4 +107,48 @@
     }
 
+    //copy constructor for cloning
+    protected DefaultSymbolicExpressionGrammar(DefaultSymbolicExpressionGrammar copy) :base() {
+      this.minSubTreeCount = new Dictionary<string, int>(copy.minSubTreeCount);
+      this.maxSubTreeCount = new Dictionary<string, int>(copy.maxSubTreeCount);
+      
+      this.startSymbol = copy.startSymbol;
+      this.allowedChildSymbols = new Dictionary<string, List<List<string>>>();
+      foreach (var entry in copy.allowedChildSymbols) {
+        this.allowedChildSymbols[entry.Key] = new List<List<string>>(entry.Value.Count);
+        foreach (var set in entry.Value) {
+          this.allowedChildSymbols[entry.Key].Add(new List<string>(set));
+        }
+      }
+      this.allSymbols = new Dictionary<string, Symbol>(copy.allSymbols);
+
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<string, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+    }
+
+    [StorableConstructor]
+    protected DefaultSymbolicExpressionGrammar(bool deserializing)
+      : base(deserializing) {
+      cachedMinExpressionLength = new Dictionary<string, int>();
+      cachedMaxExpressionLength = new Dictionary<string, int>();
+      cachedMinExpressionDepth = new Dictionary<string, int>();
+    }
+
+    public void Clear() {
+      minSubTreeCount.Clear();
+      maxSubTreeCount.Clear();
+      allowedChildSymbols.Clear();
+      allSymbols.Clear();
+
+      cachedMaxExpressionLength.Clear();
+      cachedMinExpressionLength.Clear();
+      cachedMinExpressionDepth.Clear();
+
+      startSymbol = new StartSymbol();
+      AddSymbol(startSymbol);
+      SetMinSubtreeCount(startSymbol, 1);
+      SetMaxSubtreeCount(startSymbol, 1);
+    }
+
     #region ISymbolicExpressionGrammar Members
 
@@ -117,9 +158,8 @@
     }
 
-
     public void AddSymbol(Symbol symbol) {
       if (ContainsSymbol(symbol)) throw new ArgumentException("Symbol " + symbol + " is already defined.");
       allSymbols.Add(symbol.Name, symbol);
-      allowedChildSymbols[symbol.Name] = new List<HashSet<string>>();
+      allowedChildSymbols[symbol.Name] = new List<List<string>>();
       ClearCaches();
     }
@@ -211,5 +251,5 @@
       maxSubTreeCount[symbol.Name] = nSubTrees;
       while (allowedChildSymbols[symbol.Name].Count <= nSubTrees)
-        allowedChildSymbols[symbol.Name].Add(new HashSet<string>());
+        allowedChildSymbols[symbol.Name].Add(new List<string>());
       while (allowedChildSymbols[symbol.Name].Count > nSubTrees) {
         allowedChildSymbols[symbol.Name].RemoveAt(allowedChildSymbols[symbol.Name].Count - 1);
@@ -243,16 +283,6 @@
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      DefaultSymbolicExpressionGrammar clone = (DefaultSymbolicExpressionGrammar)base.Clone(cloner);
-      clone.maxSubTreeCount = new Dictionary<string, int>(maxSubTreeCount);
-      clone.minSubTreeCount = new Dictionary<string, int>(minSubTreeCount);
-      clone.startSymbol = startSymbol;
-      clone.allowedChildSymbols = new Dictionary<string, List<HashSet<string>>>();
-      foreach (var entry in allowedChildSymbols) {
-        clone.allowedChildSymbols[entry.Key] = new List<HashSet<string>>();
-        foreach (var set in entry.Value) {
-          clone.allowedChildSymbols[entry.Key].Add(new HashSet<string>(set));
-        }
-      }
-      clone.allSymbols = new Dictionary<string, Symbol>(allSymbols);
+      DefaultSymbolicExpressionGrammar clone = new DefaultSymbolicExpressionGrammar(this);
+      cloner.RegisterClonedObject(this, clone);
       return clone;
     }
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/GlobalSymbolicExpressionGrammar.cs	(revision 3993)
@@ -72,5 +72,5 @@
     private Defun defunSymbol;
 
-    public GlobalSymbolicExpressionGrammar() : base() { } // empty constructor for cloning
+
 
     public GlobalSymbolicExpressionGrammar(ISymbolicExpressionGrammar mainBranchGrammar )
@@ -79,4 +79,18 @@
       maxFunctionDefinitions = 3;
       Initialize(mainBranchGrammar);
+    }
+
+    //copy constructor for cloning
+    protected GlobalSymbolicExpressionGrammar(GlobalSymbolicExpressionGrammar copy)
+      : base(copy) {
+      this.maxFunctionArguments = copy.maxFunctionArguments;
+      this.minFunctionArguments = copy.minFunctionArguments;
+      this.maxFunctionDefinitions = copy.maxFunctionDefinitions;
+      this.minFunctionDefinitions = copy.minFunctionDefinitions;
+    }
+
+    [StorableConstructor]
+    protected GlobalSymbolicExpressionGrammar(bool deserializing)
+      : base(deserializing) {
     }
 
@@ -142,10 +156,6 @@
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      GlobalSymbolicExpressionGrammar clone = (GlobalSymbolicExpressionGrammar)base.Clone(cloner);
-      clone.defunSymbol = defunSymbol;
-      clone.maxFunctionArguments = maxFunctionArguments;
-      clone.maxFunctionDefinitions = maxFunctionDefinitions;
-      clone.minFunctionArguments = minFunctionArguments;
-      clone.minFunctionDefinitions = minFunctionDefinitions;
+      GlobalSymbolicExpressionGrammar clone = new GlobalSymbolicExpressionGrammar(this);
+      cloner.RegisterClonedObject(this, clone);
       return clone;
     }
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Argument.cs	(revision 3993)
@@ -28,6 +28,8 @@
   /// </summary>
   [StorableClass]
-  [Item("Argument", "Symbol that represents a function argument.")]
+  [Item(Argument.ArgumentName, Argument.ArgumentDescription)]
   public sealed class Argument : ReadOnlySymbol {
+    public const string ArgumentName = "Argument";
+    public const string ArgumentDescription = "Symbol that represents a function argument.";
     [Storable]
     private int argumentIndex;
@@ -36,8 +38,13 @@
     }
 
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [StorableConstructor]
     private Argument() : base() { }
 
     public Argument(int argumentIndex)
-      : base() {
+      : base("ARG" + argumentIndex, Argument.ArgumentDescription) {
       this.argumentIndex = argumentIndex;
       this.name = "ARG" + argumentIndex;
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Defun.cs	(revision 3993)
@@ -28,7 +28,12 @@
   /// </summary>
   [StorableClass]
-  [Item("Defun", "Symbol that represents a function defining node.")]
+  [Item(Defun.DefunName, Defun.DefunDescription)]
   public sealed class Defun : ReadOnlySymbol {
-    public Defun() : base() { }
+    public const string DefunName = "Defun";
+    public const string DefunDescription = "Symbol that represents a function defining node.";
+
+    public Defun() : base(Defun.DefunName, Defun.DefunDescription) { }
+    [StorableConstructor]
+    protected Defun(bool deserializing) : base(deserializing) { }
 
     public override SymbolicExpressionTreeNode CreateTreeNode() {
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/InvokeFunction.cs	(revision 3993)
@@ -29,6 +29,8 @@
   /// </summary>
   [StorableClass]
-  [Item("InvokeFunction", "Symbol that the invokation of another function.")]
+  [Item(InvokeFunction.InvokeFunctionName, InvokeFunction.InvokeFunctionDescription)]
   public sealed class InvokeFunction : ReadOnlySymbol {
+    public const string InvokeFunctionName = "InvokeFunction";
+    public const string InvokeFunctionDescription = "Symbol that the invokation of another function.";
     public override bool CanChangeName {
       get {
@@ -46,10 +48,9 @@
     }
 
-    private InvokeFunction() : base() { }
-
+    [StorableConstructor]
+    private InvokeFunction(bool deserializing) : base(deserializing) { }
     public InvokeFunction(string functionName)
-      : base() {
+      : base("Invoke: " + functionName, InvokeFunction.InvokeFunctionDescription) {
       this.FunctionName = functionName;
-      this.name = "Invoke: " + functionName;
     }
 
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ProgramRootSymbol.cs	(revision 3993)
@@ -25,6 +25,13 @@
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols {
   [StorableClass]
-  [Item("ProgramRootSymbol", "Special symbol that represents the program root node of a symbolic expression tree.")]
+  [Item(ProgramRootSymbol.ProgramRootSymbolName, ProgramRootSymbol.ProgramRootSymbolDescription)]
   public sealed class ProgramRootSymbol : ReadOnlySymbol {
+    public const string ProgramRootSymbolName = "ProgramRootSymbol";
+    public const string ProgramRootSymbolDescription = "Special symbol that represents the program root node of a symbolic expression tree.";
+
+    public ProgramRootSymbol() : base(ProgramRootSymbol.ProgramRootSymbolName, ProgramRootSymbol.ProgramRootSymbolDescription) { }
+    [StorableConstructor]
+    private ProgramRootSymbol(bool deserializing) : base(deserializing) { }
+
     public override SymbolicExpressionTreeNode CreateTreeNode() {
       return new SymbolicExpressionTreeTopLevelNode(this);
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/ReadOnlySymbol.cs	(revision 3993)
@@ -50,10 +50,8 @@
     }
 
-    protected ReadOnlySymbol()
-      : base() {
-      this.name = ItemName;
-      this.description = ItemDescription;
-      initialFrequency = 1.0;
-    }
+    protected ReadOnlySymbol() : base() { }
+    protected ReadOnlySymbol(string name, string description) : base(name, description) { }
+    [StorableConstructor]
+    protected ReadOnlySymbol(bool deserializing) : base(deserializing) { }
   }
 }
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3990)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Symbols/Symbol.cs	(revision 3993)
@@ -54,8 +54,14 @@
     protected Symbol()
       : base() {
-      this.name = ItemName;
-      this.description = ItemDescription;
       initialFrequency = 1.0;
     }
+
+    protected Symbol(string name, string description)
+      : base(name, description) {
+      initialFrequency = 1.0;
+    }
+
+    [StorableConstructor]
+    protected Symbol(bool deserializing) : base(deserializing) { }
 
     public virtual SymbolicExpressionTreeNode CreateTreeNode() {
