Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs	(revision 5499)
@@ -26,12 +26,10 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   [StorableClass]
   [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")]
   public sealed class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator {
-
     [StorableConstructor]
     private ChangeNodeTypeManipulation(bool deserializing) : base(deserializing) { }
@@ -43,38 +41,40 @@
     }
 
-    protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
-      ChangeNodeType(random, symbolicExpressionTree, grammar, maxTreeSize.Value, maxTreeHeight.Value, out success);
+    protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree) {
+      ChangeNodeType(random, symbolicExpressionTree);
     }
 
-    public static void ChangeNodeType(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, int maxTreeSize, int maxTreeHeight, out bool success) {
+    public static void ChangeNodeType(IRandom random, SymbolicExpressionTree symbolicExpressionTree) {
 
       // select any node as parent (except the root node)
       var manipulationPoint = (from parent in symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1)
                                from subtree in parent.SubTrees
-                               select new { Parent = parent, Node = subtree, Index = parent.SubTrees.IndexOf(subtree) }).SelectRandom(random);
+                               select new { Parent = parent, Node = subtree, Index = parent.IndexOfSubTree(subtree) })
+                               .SelectRandom(random);
+      int subTreeCount = manipulationPoint.Node.SubTrees.Count();
       // find possible symbols for the node (also considering the existing branches below it)
       var allowedSymbols = from symbol in manipulationPoint.Parent.GetAllowedSymbols(manipulationPoint.Index)
-                           where manipulationPoint.Node.SubTrees.Count <= manipulationPoint.Node.Grammar.GetMaxSubtreeCount(symbol)
-                           where manipulationPoint.Node.SubTrees.Count >= manipulationPoint.Node.Grammar.GetMinSubtreeCount(symbol)
+                           where subTreeCount <= manipulationPoint.Node.Grammar.GetMaxSubtreeCount(symbol)
+                           where subTreeCount >= manipulationPoint.Node.Grammar.GetMinSubtreeCount(symbol)
                            select symbol;
 
       if (allowedSymbols.Count() == 0) {
-        success = false;
         return;
       }
       var node = manipulationPoint.Node;
       // keep only symbols that are still possible considering the existing sub-trees
-      var constrainedSymbols = from symbol in allowedSymbols
-                               let disallowedSubtrees =
-                                     from subtree in node.SubTrees
-                                     where !node.Grammar.IsAllowedChild(symbol, subtree.Symbol, node.SubTrees.IndexOf(subtree))
-                                     select subtree
-                               where disallowedSubtrees.Count() == 0
-                               select symbol;
+      var constrainedSymbols = (from symbol in allowedSymbols
+                                let disallowedSubtrees =
+                                      from subtree in node.SubTrees
+                                      where !node.Grammar.IsAllowedChild(symbol, subtree.Symbol, node.IndexOfSubTree(subtree))
+                                      select subtree
+                                where disallowedSubtrees.Count() == 0
+                                select symbol)
+                               .ToList();
       if (constrainedSymbols.Count() == 0) {
-        success = false;
         return;
       }
-      var newSymbol = SelectRandomSymbol(random, constrainedSymbols);
+      var weights = constrainedSymbols.Select(s => s.InitialFrequency).ToList();
+      var newSymbol =  constrainedSymbols.SelectRandom(weights, random);
 
       // replace the old node with the new node
@@ -86,21 +86,4 @@
       manipulationPoint.Parent.RemoveSubTree(manipulationPoint.Index);
       manipulationPoint.Parent.InsertSubTree(manipulationPoint.Index, newNode);
-      success = true;
-    }
-
-    private static Symbol SelectRandomSymbol(IRandom random, IEnumerable<Symbol> symbols) {
-      var symbolList = symbols.ToList();
-      var ticketsSum = symbolList.Select(x => x.InitialFrequency).Sum();
-      if (ticketsSum == 0.0) throw new ArgumentException("The initial frequency of all allowed symbols is zero.");
-      var r = random.NextDouble() * ticketsSum;
-      double aggregatedTickets = 0;
-      for (int i = 0; i < symbolList.Count; i++) {
-        aggregatedTickets += symbolList[i].InitialFrequency;
-        if (aggregatedTickets > r) {
-          return symbolList[i];
-        }
-      }
-      // this should never happen
-      throw new ArgumentException("There is a problem with the initial frequency setting of allowed symbols.");
     }
   }
Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs	(revision 5499)
@@ -24,14 +24,29 @@
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
 
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   [StorableClass]
   [Item("FullTreeShaker", "Manipulates all nodes that have local parameters.")]
   public sealed class FullTreeShaker : SymbolicExpressionTreeManipulator {
+    private const string ShakingFactorParameterName = "ShakingFactor";
+    #region parameter properties
+    public IValueLookupParameter<DoubleValue> ShakingFactorParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue ShakingFactor {
+      get { return ShakingFactorParameter.ActualValue; }
+    }
+    #endregion
 
     [StorableConstructor]
     private FullTreeShaker(bool deserializing) : base(deserializing) { }
     private FullTreeShaker(FullTreeShaker original, Cloner cloner) : base(original, cloner) { }
-    public FullTreeShaker() : base() { }
+    public FullTreeShaker()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -39,11 +54,10 @@
     }
 
-    protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
-      foreach (var node in symbolicExpressionTree.IterateNodesPrefix()) {
+    protected override void Manipulate(IRandom random, SymbolicExpressionTree tree) {
+      tree.Root.ForEachNodePostfix(node => {
         if (node.HasLocalParameters) {
-          node.ShakeLocalParameters(random, 1.0);
+          node.ShakeLocalParameters(random, ShakingFactor.Value);
         }
-      }
-      success = true;
+      });
     }
   }
Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs	(revision 5499)
@@ -26,5 +26,4 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
 using HeuristicLab.Operators;
 using HeuristicLab.Optimization;
@@ -33,12 +32,14 @@
 using HeuristicLab.PluginInfrastructure;
 
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   [Item("MultiSymbolicExpressionTreeManipulator", "Randomly selects and applies one of its manipulators every time it is called.")]
   [StorableClass]
-  public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>, ISymbolicExpressionTreeManipulator, IStochasticOperator {
-    private const string MaxTreeSizeParameterName = "MaxTreeSize";
-    private const string MaxTreeHeightParameterName = "MaxTreeHeight";
-    private const string SymbolicExpressionGrammarParameterName = "SymbolicExpressionGrammar";
+  public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>,
+    ISymbolicExpressionTreeManipulator,
+    IStochasticOperator,
+    ISymbolicExpressionTreeSizeConstraintOperator {
     private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
 
     public override bool CanChangeName {
@@ -49,19 +50,13 @@
     }
 
-    #region ISymbolicExpressionTreeManipulator Members
-    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
     }
-    #endregion
-
-    #region ISymbolicExpressionTreeOperator Members
-    public IValueLookupParameter<IntValue> MaxTreeSizeParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxTreeSizeParameterName]; }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
     }
-    public IValueLookupParameter<IntValue> MaxTreeHeightParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[MaxTreeHeightParameterName]; }
-    }
-    public ILookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionGrammarParameter {
-      get { return (ILookupParameter<ISymbolicExpressionGrammar>)Parameters[SymbolicExpressionGrammarParameterName]; }
+    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
     #endregion
@@ -72,8 +67,7 @@
     public MultiSymbolicExpressionTreeManipulator()
       : base() {
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxTreeSizeParameterName, "The maximal size (number of nodes) of the symbolic expression tree."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(MaxTreeHeightParameterName, "The maximal height of the symbolic expression tree (a tree with one node has height = 0)."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
 
       foreach (Type type in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeManipulator))) {
@@ -98,13 +92,13 @@
 
     private void ParameterizeManipulators() {
+      foreach (IStochasticOperator manipulator in Operators.OfType<IStochasticOperator>()) {
+        manipulator.RandomParameter.ActualName = RandomParameter.Name;
+      }
       foreach (ISymbolicExpressionTreeManipulator manipulator in Operators.OfType<ISymbolicExpressionTreeManipulator>()) {
-        manipulator.MaxTreeSizeParameter.ActualName = MaxTreeSizeParameter.Name;
-        manipulator.MaxTreeHeightParameter.ActualName = MaxTreeHeightParameter.Name;
-        manipulator.SymbolicExpressionGrammarParameter.ActualName = SymbolicExpressionGrammarParameter.Name;
         manipulator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
       }
-
-      foreach (IStochasticOperator manipulator in Operators.OfType<IStochasticOperator>()) {
-        manipulator.RandomParameter.ActualName = RandomParameter.Name;
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator manipulator in Operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        manipulator.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
+        manipulator.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
       }
     }
Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs	(revision 5499)
@@ -25,13 +25,28 @@
 using HeuristicLab.Data;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
 
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   [StorableClass]
   [Item("OnePointShaker", "Selects a random node with local parameters and manipulates the selected node.")]
   public sealed class OnePointShaker : SymbolicExpressionTreeManipulator {
+    private const string ShakingFactorParameterName = "ShakingFactor";
+    #region parameter properties
+    public IValueLookupParameter<DoubleValue> ShakingFactorParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[ShakingFactorParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue ShakingFactor {
+      get { return ShakingFactorParameter.ActualValue; }
+    }
+    #endregion
     [StorableConstructor]
     private OnePointShaker(bool deserializing) : base(deserializing) { }
     private OnePointShaker(OnePointShaker original, Cloner cloner) : base(original, cloner) { }
-    public OnePointShaker() : base() { }
+    public OnePointShaker()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(ShakingFactorParameterName, "The shaking factor that should be used for the manipulation of constants (default=1.0).", new DoubleValue(1.0)));
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -39,15 +54,12 @@
     }
 
-    protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
-      var parametricNodes = from node in symbolicExpressionTree.IterateNodesPrefix()
+    protected override void Manipulate(IRandom random, SymbolicExpressionTree tree) {
+      var parametricNodes = from node in tree.IterateNodesPrefix()
                             where node.HasLocalParameters
                             select node;
       if (parametricNodes.Count() > 0) {
-        SymbolicExpressionTreeNode selectedPoint = parametricNodes.SelectRandom(random);
+        var selectedPoint = parametricNodes.SelectRandom(random);
 
-        selectedPoint.ShakeLocalParameters(random, 1.0);
-        success = true;
-      } else {
-        success = false;
+        selectedPoint.ShakeLocalParameters(random, ShakingFactor.Value);
       }
     }
Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs	(revision 5499)
@@ -26,16 +26,38 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Parameters;
 
-namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators {
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
   [StorableClass]
   [Item("ReplaceBranchManipulation", "Selects a branch of the tree randomly and replaces it with a newly initialized branch (using PTC2).")]
-  public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator {
+  public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator, ISymbolicExpressionTreeSizeConstraintOperator {
+    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
+    private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    #region Parameter Properties
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    #endregion
+    #region Properties
+    public IntValue MaximumSymbolicExpressionTreeLength {
+      get { return MaximumSymbolicExpressionTreeLengthParameter.ActualValue; }
+    }
+    public IntValue MaximumSymbolicExpressionTreeDepth {
+      get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    #endregion
+
     [StorableConstructor]
     private ReplaceBranchManipulation(bool deserializing) : base(deserializing) { }
     private ReplaceBranchManipulation(ReplaceBranchManipulation original, Cloner cloner) : base(original, cloner) { }
-    public ReplaceBranchManipulation() : base() { }
+    public ReplaceBranchManipulation()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -43,25 +65,26 @@
     }
 
-    protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) {
-      ReplaceRandomBranch(random, symbolicExpressionTree, grammar, maxTreeSize.Value, maxTreeHeight.Value, out success);
+    protected override void Manipulate(IRandom random, ISymbolicExpressionTree symbolicExpressionTree) {
+      ReplaceRandomBranch(random, symbolicExpressionTree, MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
 
-    public static void ReplaceRandomBranch(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, int maxTreeSize, int maxTreeHeight, out bool success) {
-      success = false;
+    public static void ReplaceRandomBranch(IRandom random, ISymbolicExpressionTree symbolicExpressionTree, int maxTreeLength, int maxTreeDepth) {
       // select any node as parent (except the root node)
       var manipulationPoint = (from parent in symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1)
                                from subtree in parent.SubTrees
-                               select new { Parent = parent, Node = subtree, Index = parent.SubTrees.IndexOf(subtree) }).SelectRandom(random);
+                               select new { Parent = parent, Node = subtree, Index = parent.IndexOfSubTree(subtree) })
+                               .SelectRandom(random);
 
-      int maxSize = maxTreeSize - symbolicExpressionTree.Size + manipulationPoint.Node.GetSize();
-      int maxHeight = maxTreeHeight - symbolicExpressionTree.Height + manipulationPoint.Node.GetHeight();
+      int maxLength = maxTreeLength - symbolicExpressionTree.Size + manipulationPoint.Node.GetSize();
+      int maxDepth = maxTreeDepth - symbolicExpressionTree.Height + manipulationPoint.Node.GetHeight();
       // find possible symbols for the node (also considering the existing branches below it)
-      var allowedSymbols = from symbol in manipulationPoint.Parent.GetAllowedSymbols(manipulationPoint.Index)
-                           where manipulationPoint.Node.Grammar.GetMinExpressionDepth(symbol) <= maxHeight
-                           where manipulationPoint.Node.Grammar.GetMinExpressionLength(symbol) <= maxSize
-                           select symbol;
+      var allowedSymbols = (from symbol in manipulationPoint.Parent.GetAllowedSymbols(manipulationPoint.Index)
+                            where manipulationPoint.Node.Grammar.GetMinExpressionDepth(symbol) <= maxDepth
+                            where manipulationPoint.Node.Grammar.GetMinExpressionLength(symbol) <= maxLength
+                            select symbol).ToList();
       if (allowedSymbols.Count() == 0) return;
-
-      var seedSymbol = SelectRandomSymbol(random, allowedSymbols);  // replace the old node with the new node
+      var weights = allowedSymbols.Select(s => s.InitialFrequency).ToList();
+      var seedSymbol = allowedSymbols.SelectRandom(weights, random);
+      // replace the old node with the new node
       var seedNode = seedSymbol.CreateTreeNode();
       if (seedNode.HasLocalParameters)
@@ -70,22 +93,5 @@
       manipulationPoint.Parent.RemoveSubTree(manipulationPoint.Index);
       manipulationPoint.Parent.InsertSubTree(manipulationPoint.Index, seedNode);
-      seedNode = ProbabilisticTreeCreator.PTC2(random, seedNode, maxSize, maxHeight, 0, 0);
-      success = true;
-    }
-
-    private static Symbol SelectRandomSymbol(IRandom random, IEnumerable<Symbol> symbols) {
-      var symbolList = symbols.ToList();
-      var ticketsSum = symbolList.Select(x => x.InitialFrequency).Sum();
-      if (ticketsSum == 0.0) throw new ArgumentException("The initial frequency of all allowed symbols is zero.");
-      var r = random.NextDouble() * ticketsSum;
-      double aggregatedTickets = 0;
-      for (int i = 0; i < symbolList.Count; i++) {
-        aggregatedTickets += symbolList[i].InitialFrequency;
-        if (aggregatedTickets > r) {
-          return symbolList[i];
-        }
-      }
-      // this should never happen
-      throw new ArgumentException("There is a problem with the initial frequency setting of allowed symbols.");
+      seedNode = ProbabilisticTreeCreator.PTC2(random, seedNode, maxLength, maxDepth, 0, 0);
     }
   }
Index: branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs
===================================================================
--- branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 5494)
+++ branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs	(revision 5499)
@@ -33,11 +33,7 @@
   [StorableClass]
   public abstract class SymbolicExpressionTreeManipulator : SymbolicExpressionTreeOperator, ISymbolicExpressionTreeManipulator {
-    private const string FailedManipulationEventsParameterName = "FailedManipulationEvents";
     private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
 
     #region Parameter Properties
-    public IValueParameter<IntValue> FailedManipulationEventsParameter {
-      get { return (IValueParameter<IntValue>)Parameters[FailedManipulationEventsParameterName]; }
-    }
     public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
       get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
@@ -46,7 +42,4 @@
 
     #region Properties
-    public IntValue FailedManipulationEvents {
-      get { return FailedManipulationEventsParameter.Value; }
-    }
     public SymbolicExpressionTree SymbolicExpressionTree {
       get { return SymbolicExpressionTreeParameter.ActualValue; }
@@ -59,5 +52,4 @@
     public SymbolicExpressionTreeManipulator()
       : base() {
-      Parameters.Add(new ValueParameter<IntValue>(FailedManipulationEventsParameterName, "The number of failed manipulation events.", new IntValue()));
       Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));
     }
@@ -65,14 +57,10 @@
     public sealed override IOperation Apply() {
       SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
-      bool success;
-      Manipulate(RandomParameter.ActualValue, tree, SymbolicExpressionGrammarParameter.ActualValue,
-        MaxTreeSizeParameter.ActualValue, MaxTreeHeightParameter.ActualValue, out success);
+      Manipulate(RandomParameter.ActualValue, tree);
 
-      if (!success) FailedManipulationEvents.Value++;
       return base.Apply();
     }
 
-    protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar,
-      IntValue maxTreeSize, IntValue maxTreeHeight, out bool success);
+    protected abstract void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree);
   }
 }
