Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs	(revision 4477)
@@ -85,8 +85,8 @@
 
       // find all invocations of the selected ADF and attach a cloned version of the replaced branch (with all argument-nodes expanded)
-      var invocationNodes = from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
-                            where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
-                            where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
-                            select node;
+      var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                             where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                             where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
+                             select node).ToList();
       // do this repeatedly until no matching invocations are found      
       while (invocationNodes.Count() > 0) {
@@ -99,9 +99,9 @@
           newlyAddedBranches.Add(clonedBranch);
         }
-        invocationNodes = from newlyAddedBranch in newlyAddedBranches
-                          from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
-                          where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
-                          where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
-                          select node;
+        invocationNodes = (from newlyAddedBranch in newlyAddedBranches
+                           from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                           where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                           where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
+                           select node).ToList();
       }
       // increase expected number of arguments of function defining branch
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentDuplicater.cs	(revision 4477)
@@ -79,8 +79,8 @@
       }
       // find invocations of the functions and duplicate the matching argument branch
-      var invocationNodes = from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
-                            where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
-                            where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
-                            select node;
+      var invocationNodes = (from node in symbolicExpressionTree.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                             where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                             where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
+                             select node).ToList();
       // do this repeatedly until no matching invocations are found      
       while (invocationNodes.Count() > 0) {
@@ -92,9 +92,9 @@
           newlyAddedBranches.Add(clonedArgumentBranch);
         }
-        invocationNodes = from newlyAddedBranch in newlyAddedBranches
-                          from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
-                          where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
-                          where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
-                          select node;
+        invocationNodes = (from newlyAddedBranch in newlyAddedBranches
+                           from node in newlyAddedBranch.IterateNodesPrefix().OfType<InvokeFunctionTreeNode>()
+                           where node.Symbol.FunctionName == selectedDefunBranch.FunctionName
+                           where node.SubTrees.Count == selectedDefunBranch.NumberOfArguments
+                           select node).ToList();
       }
       // register the new argument symbol and increase the number of arguments of the ADF
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4477)
@@ -131,8 +131,8 @@
         beta = 1;
       } else {
-        if (yVarianceCalculator.Variance.IsAlmost(0.0))
+        if (yVarianceCalculator.PopulationVariance.IsAlmost(0.0))
           beta = 1;
         else
-          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.Variance;
+          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.PopulationVariance;
 
         alpha = tMeanCalculator.Mean - beta * yVarianceCalculator.Mean;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 4477)
@@ -83,12 +83,8 @@
         SymbolicSimplifier simplifier = new SymbolicSimplifier();
         simplifiedExpressionTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
-        SymbolicExpressionTreeNode root = new ProgramRootSymbol().CreateTreeNode();
-        SymbolicExpressionTreeNode start = new StartSymbol().CreateTreeNode();
-        root.AddSubTree(start);
-        start.AddSubTree(simplifiedExpressionTree.Root);
         int samplesStart = Content.ProblemData.TrainingSamplesStart.Value;
         int samplesEnd = Content.ProblemData.TrainingSamplesEnd.Value;
         double originalTrainingMeanSquaredError = SymbolicRegressionMeanSquaredErrorEvaluator.Calculate(
-            Content.Model.Interpreter, new SymbolicExpressionTree(root), Content.LowerEstimationLimit, Content.UpperEstimationLimit,
+            Content.Model.Interpreter, simplifiedExpressionTree, Content.LowerEstimationLimit, Content.UpperEstimationLimit,
             Content.ProblemData.Dataset, Content.ProblemData.TargetVariable.Value,
             Enumerable.Range(samplesStart, samplesEnd - samplesStart));
@@ -96,6 +92,7 @@
         this.CalculateReplacementNodes();
 
-        this.CalculateNodeImpacts(new SymbolicExpressionTree(root), start, originalTrainingMeanSquaredError);
-        this.treeChart.Tree = simplifiedExpressionTree;
+        this.CalculateNodeImpacts(simplifiedExpressionTree, simplifiedExpressionTree.Root.SubTrees[0], originalTrainingMeanSquaredError);
+        // show only interesting part of solution
+        this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0].SubTrees[0]);
         this.PaintNodeImpacts();
       }
@@ -110,9 +107,11 @@
       SymbolicExpressionTree tree = new SymbolicExpressionTree(root);
       foreach (SymbolicExpressionTreeNode node in this.simplifiedExpressionTree.IterateNodesPrefix()) {
-        while (start.SubTrees.Count > 0) start.RemoveSubTree(0);
-        start.AddSubTree(node);
-        double constantTreeNodeValue = interpreter.GetSymbolicExpressionTreeValues(tree, Content.ProblemData.Dataset, trainingSamples).Median();
-        ConstantTreeNode constantTreeNode = MakeConstantTreeNode(constantTreeNodeValue);
-        replacementNodes[node] = constantTreeNode;
+        if (!(node.Symbol is ProgramRootSymbol || node.Symbol is StartSymbol)) {
+          while (start.SubTrees.Count > 0) start.RemoveSubTree(0);
+          start.AddSubTree(node);
+          double constantTreeNodeValue = interpreter.GetSymbolicExpressionTreeValues(tree, Content.ProblemData.Dataset, trainingSamples).Median();
+          ConstantTreeNode constantTreeNode = MakeConstantTreeNode(constantTreeNodeValue);
+          replacementNodes[node] = constantTreeNode;
+        }
       }
     }
@@ -169,11 +168,9 @@
         }
       }
-      this.treeChart.Tree = simplifiedExpressionTree;
-
-      SymbolicExpressionTreeNode root = new ProgramRootSymbol().CreateTreeNode();
-      SymbolicExpressionTreeNode start = new StartSymbol().CreateTreeNode();
-      root.AddSubTree(start);
-      SymbolicExpressionTree tree = new SymbolicExpressionTree(root);
-      start.AddSubTree(simplifiedExpressionTree.Root);
+
+      // show only interesting part of solution
+      this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0].SubTrees[0]);
+
+      SymbolicExpressionTree tree = (SymbolicExpressionTree)simplifiedExpressionTree.Clone();
 
       this.Content.ModelChanged -= new EventHandler(Content_ModelChanged);
@@ -189,5 +186,5 @@
       double min = impacts.Min();
       foreach (SymbolicExpressionTreeNode treeNode in simplifiedExpressionTree.IterateNodesPostfix()) {
-        if (!(treeNode is ConstantTreeNode)) {
+        if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
           double impact = this.nodeImpacts[treeNode];
           double replacementValue = this.replacementNodes[treeNode].Value;
@@ -211,6 +208,9 @@
         if (treeNode is ConstantTreeNode && replacementNodes.ContainsValue((ConstantTreeNode)treeNode))
           this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.DarkOrange;
-        else
-          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.Black;
+        else {
+          VisualSymbolicExpressionTreeNode visNode = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
+          if (visNode != null)
+            visNode.LineColor = Color.Black;
+        }
       }
     }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs	(revision 4477)
@@ -44,5 +44,7 @@
       // macro expand (initially no argument trees)
       var macroExpandedTree = MacroExpand(clone, clone.SubTrees[0], new List<SymbolicExpressionTreeNode>());
-      return new SymbolicExpressionTree(GetSimplifiedTree(macroExpandedTree));
+      SymbolicExpressionTreeNode rootNode = (new ProgramRootSymbol()).CreateTreeNode();
+      rootNode.AddSubTree(GetSimplifiedTree(macroExpandedTree));
+      return new SymbolicExpressionTree(rootNode);
     }
 
@@ -63,6 +65,4 @@
         // return the correct argument sub-tree (already macro-expanded)
         return (SymbolicExpressionTreeNode)argumentTrees[argSym.ArgumentIndex].Clone();
-      } else if (node.Symbol is StartSymbol) {
-        return MacroExpand(root, subtrees[0], argumentTrees);
       } else {
         // recursive application
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/HeuristicLab.Problems.DataAnalysis.Tests-3.3.csproj	(revision 4477)
@@ -80,8 +80,8 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
-    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
-    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
@@ -96,8 +96,8 @@
     <ErrorReport>prompt</ErrorReport>
     <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
-    <CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
-    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
-    <CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisRuleSetDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisRuleDirectories>;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
   </PropertyGroup>
   <ItemGroup>
@@ -150,4 +150,8 @@
       <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
       <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\..\HeuristicLab.Problems.DataAnalysis.Regression\3.3\HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj">
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/LinearScalingTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/LinearScalingTest.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/LinearScalingTest.cs	(revision 4477)
@@ -36,5 +36,5 @@
   [TestClass()]
   public class LinearScalingTest {
-    [TestMethod()]
+    [TestMethod]
     public void CalculateScalingParametersTest() {
       var testData = new double[,] {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SimpleArithmeticExpressionInterpreterTest.cs	(revision 4477)
@@ -70,6 +70,5 @@
     }
 
-
-    [TestMethod()]
+    [TestMethod]
     public void SimpleArithmeticExpressionInterpreterPerformanceTest() {
       double[] estimation = new double[Rows];
@@ -85,5 +84,5 @@
     ///A test for Evaluate
     ///</summary>
-    [TestMethod()]
+    [TestMethod]
     public void SimpleArithmeticExpressionInterpreterEvaluateTest() {
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/StatisticCalculatorsTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/StatisticCalculatorsTest.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/StatisticCalculatorsTest.cs	(revision 4477)
@@ -61,5 +61,5 @@
       };
 
-    [TestMethod()]
+    [TestMethod]
     public void CalculateMeanAndVarianceTest() {
       System.Random random = new System.Random(31415);
@@ -92,5 +92,5 @@
     }
 
-    [TestMethod()]
+    [TestMethod]
     public void CalculatePearsonsRSquaredTest() {
       System.Random random = new System.Random(31415);
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicSimplifierTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicSimplifierTest.cs	(revision 4476)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Tests/SymbolicSimplifierTest.cs	(revision 4477)
@@ -40,5 +40,4 @@
   [TestClass()]
   public class SymbolicSimplifierTest {
-    [TestMethod()]
     [DeploymentItem(@"RegressionSolution01.hl")]
     [DeploymentItem(@"RegressionSolution02.hl")]
@@ -47,4 +46,5 @@
     [DeploymentItem(@"RegressionSolution05.hl")]
     [DeploymentItem(@"RegressionSolution06.hl")]
+    [TestMethod]
     public void SimplifyRegressionSolutionsTest() {
       ContentManager.Initialize(new PersistenceContentManager());
@@ -98,10 +98,5 @@
     private SymbolicRegressionSolution SimplifySolution(SymbolicRegressionSolution original) {
       SymbolicSimplifier simplifier = new SymbolicSimplifier();
-      SymbolicExpressionTree simplifiedExpression = simplifier.Simplify(original.Model.SymbolicExpressionTree);
-      SymbolicExpressionTreeNode root = new ProgramRootSymbol().CreateTreeNode();
-      SymbolicExpressionTreeNode start = new StartSymbol().CreateTreeNode();
-      root.AddSubTree(start);
-      start.AddSubTree(simplifiedExpression.Root);
-      SymbolicExpressionTree simplifiedTree = new SymbolicExpressionTree(root);
+      SymbolicExpressionTree simplifiedTree = simplifier.Simplify(original.Model.SymbolicExpressionTree);
       SymbolicRegressionModel simplifiedModel = new SymbolicRegressionModel(original.Model.Interpreter, simplifiedTree);
       return new SymbolicRegressionSolution(original.ProblemData, simplifiedModel, original.LowerEstimationLimit, original.UpperEstimationLimit);
