Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/BasicSymbolicRegression/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/BasicSymbolicRegression/Problem.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/BasicSymbolicRegression/Problem.cs	(revision 13267)
@@ -102,14 +102,14 @@
       return InterpretRec(tree.Root.GetSubtree(0).GetSubtree(0), dataset, rows);
     }
-
-
+                                                                                                       
     private IEnumerable<double> InterpretRec(ISymbolicExpressionTreeNode node, IDataset dataset, IEnumerable<int> rows) {
-      var eval = CreateEvalClosure(dataset, rows);
+      Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<double, double, double>, IEnumerable<double>> binaryEval =
+        (left, right, f) => InterpretRec(left, dataset,rows).Zip(InterpretRec(right, dataset, rows), f);
 
       switch (node.Symbol.Name) {
-        case "+": return eval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x + y);
-        case "*": return eval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x * y);
-        case "-": return eval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x - y);
-        case "%": return eval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => y.IsAlmost(0.0) ? 0.0 : x / y); // protected division
+        case "+": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x + y);
+        case "*": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x * y);
+        case "-": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x - y);
+        case "%": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => y.IsAlmost(0.0) ? 0.0 : x / y); // protected division
         default: {
             double erc;
@@ -124,13 +124,4 @@
     }
 
-    private Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<double, double, double>, IEnumerable<double>> CreateEvalClosure(IDataset dataset, IEnumerable<int> rows) {
-      // capture dataset and rows in scope
-      return (a, b, f) => {
-        var leftResult = InterpretRec(a, dataset, rows);
-        var rightResult = InterpretRec(b, dataset, rows);
-        return leftResult.Zip(rightResult, f);
-      };
-    }
-
     #region item cloning and persistence
     // persistence
Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/EvenParityProblem.cs	(revision 13267)
@@ -38,7 +38,5 @@
 
     #region parameter names
-
     private const string NumberOfBitsParameterName = "NumberOfBits";
-
     #endregion
 
@@ -47,15 +45,11 @@
       get { return (IFixedValueParameter<IntValue>)Parameters[NumberOfBitsParameterName]; }
     }
-
     #endregion
 
     #region Properties
-
     public int NumberOfBits {
       get { return NumberOfBitsParameter.Value.Value; }
       set { NumberOfBitsParameter.Value.Value = value; }
     }
-
-
     #endregion
 
@@ -110,14 +104,13 @@
     }
 
-
     private static IEnumerable<bool> InterpretRec(ISymbolicExpressionTreeNode node, IEnumerable<int> bs) {
-      Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<bool, bool, bool>, IEnumerable<bool>> eval2 =
+      Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<bool, bool, bool>, IEnumerable<bool>> binaryEval =
         (left, right, f) => InterpretRec(left, bs).Zip(InterpretRec(right, bs), f);
 
       switch (node.Symbol.Name) {
-        case "AND": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x & y);
-        case "OR": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x | y);
-        case "NAND": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => !(x & y));
-        case "NOR": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => !(x | y));
+        case "AND":  return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x & y);
+        case "OR":   return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x | y);
+        case "NAND": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => !(x & y));
+        case "NOR":  return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => !(x | y));
         default: {
             byte bitPos;
@@ -154,5 +147,4 @@
 
     #region events
-
     private void RegisterEventHandlers() {
       NumberOfBitsParameter.Value.ValueChanged += (sender, args) => UpdateGrammar();
Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Boolean/MultiplexerProblem.cs	(revision 13267)
@@ -40,25 +40,18 @@
 
     #region parameter names
-
     private const string NumberOfBitsParameterName = "NumberOfBits";
-
     #endregion
 
     #region Parameter Properties
-
     public IFixedValueParameter<IntValue> NumberOfBitsParameter {
       get { return (IFixedValueParameter<IntValue>)Parameters[NumberOfBitsParameterName]; }
     }
-
     #endregion
 
     #region Properties
-
     public int NumberOfBits {
       get { return NumberOfBitsParameter.Value.Value; }
       set { NumberOfBitsParameter.Value.Value = value; }
     }
-
-
     #endregion
 
@@ -105,5 +98,5 @@
     public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
       if (NumberOfBits <= 0) throw new NotSupportedException("Number of bits must be larger than zero.");
-      if (NumberOfBits > 37) throw new NotSupportedException("Mupltiplexer does not support problems with number of bits > 37.");
+      if (NumberOfBits > 37) throw new NotSupportedException("Multiplexer does not support problems with number of bits > 37.");
       var bs = Enumerable.Range(0, (int)Math.Pow(2, NumberOfBits));
       var addrBits = (int)Math.Log(NumberOfBits, 2); // largest power of two that fits into the number of bits
@@ -134,14 +127,14 @@
 
     private static IEnumerable<bool> InterpretRec(ISymbolicExpressionTreeNode node, IEnumerable<int> bs, byte addrBits) {
-      Func<ISymbolicExpressionTreeNode, Func<bool, bool>, IEnumerable<bool>> eval1 =
+      Func<ISymbolicExpressionTreeNode, Func<bool, bool>, IEnumerable<bool>> unaryEval =
         (child, f) => InterpretRec(child, bs, addrBits).Select(f);
-      Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<bool, bool, bool>, IEnumerable<bool>> eval2 =
+      Func<ISymbolicExpressionTreeNode, ISymbolicExpressionTreeNode, Func<bool, bool, bool>, IEnumerable<bool>> binaryEval =
         (left, right, f) => InterpretRec(left, bs, addrBits).Zip(InterpretRec(right, bs, addrBits), f);
 
       switch (node.Symbol.Name) {
-        case "AND": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x & y);
-        case "OR": return eval2(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x | y);
-        case "NOT": return eval1(node.GetSubtree(0), (x) => !x);
-        case "IF": return EvalIf(node.GetSubtree(0), node.GetSubtree(1), node.GetSubtree(2), bs, addrBits);
+        case "AND": return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x & y);
+        case "OR":  return binaryEval(node.GetSubtree(0), node.GetSubtree(1), (x, y) => x | y);
+        case "NOT": return unaryEval(node.GetSubtree(0), (x) => !x);
+        case "IF":  return EvalIf(node.GetSubtree(0), node.GetSubtree(1), node.GetSubtree(2), bs, addrBits);
         default: {
             if (node.Symbol.Name[0] == 'a') {
@@ -199,5 +192,4 @@
 
     #region events
-
     private void RegisterEventHandlers() {
       NumberOfBitsParameter.Value.ValueChanged += (sender, args) => UpdateGrammar();
Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs	(revision 13267)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Problems.GeneticProgramming.LawnMower {
-  public class Interpreter {
+  public static class Interpreter {
     private enum Heading {
       South,
@@ -45,7 +45,5 @@
     }
 
-
     public static bool[,] EvaluateLawnMowerProgram(int length, int width, ISymbolicExpressionTree tree) {
-
       bool[,] lawn = new bool[length, width];
       var mowerState = new MowerState();
@@ -56,5 +54,4 @@
       return lawn;
     }
-
 
     private static Tuple<int, int> EvaluateLawnMowerProgram(ISymbolicExpressionTreeNode node, MowerState mowerState, bool[,] lawn, IEnumerable<ISymbolicExpressionTreeNode> adfs) {
Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs	(revision 13267)
@@ -51,10 +51,13 @@
 
     [StorableConstructor]
-    protected Problem(bool deserializing)
-      : base(deserializing) {
+    protected Problem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+
+    protected Problem(Problem original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Problem(this, cloner);
     }
-    protected Problem(Problem original, Cloner cloner)
-      : base(original, cloner) {
-    }
+
     public Problem()
       : base() {
@@ -87,8 +90,4 @@
     }
 
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() { }
-
     public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
       var length = LawnLengthParameter.Value.Value;
@@ -105,8 +104,4 @@
       return numberOfMowedCells;
     }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Problem(this, cloner);
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs	(revision 13266)
+++ trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs	(revision 13267)
@@ -39,4 +39,7 @@
     [StorableConstructor]
     private Solution(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+
     private Solution(Solution original, Cloner cloner)
       : base(original, cloner) {
@@ -45,4 +48,7 @@
       this.Tree = cloner.Clone(original.Tree);
       this.Quality = original.Quality;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Solution(this, cloner);
     }
 
@@ -54,10 +60,4 @@
       this.Quality = quality;
     }
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Solution(this, cloner);
-    }
   }
 }
