Index: /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.Designer.cs
===================================================================
--- /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.Designer.cs	(revision 18068)
+++ /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.Designer.cs	(revision 18069)
@@ -32,4 +32,5 @@
       this.infoLabel = new System.Windows.Forms.Label();
       this.templateStructureGroupBox = new System.Windows.Forms.GroupBox();
+      this.linearScalingCheckBox = new System.Windows.Forms.CheckBox();
       this.treeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
       this.splitContainer = new System.Windows.Forms.SplitContainer();
@@ -48,15 +49,16 @@
       this.expressionInput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-      this.expressionInput.Location = new System.Drawing.Point(6, 19);
+      this.expressionInput.Location = new System.Drawing.Point(3, 19);
       this.expressionInput.Name = "expressionInput";
-      this.expressionInput.Size = new System.Drawing.Size(288, 20);
+      this.expressionInput.Size = new System.Drawing.Size(291, 20);
       this.expressionInput.TabIndex = 1;
       this.expressionInput.TextChanged += new System.EventHandler(this.ExpressionInputTextChanged);
+      this.expressionInput.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ExpressionInputKeyUp);
       // 
       // parseButton
       // 
-      this.parseButton.Location = new System.Drawing.Point(6, 45);
+      this.parseButton.Location = new System.Drawing.Point(3, 45);
       this.parseButton.Name = "parseButton";
-      this.parseButton.Size = new System.Drawing.Size(143, 23);
+      this.parseButton.Size = new System.Drawing.Size(140, 23);
       this.parseButton.TabIndex = 3;
       this.parseButton.Text = "Parse";
@@ -64,9 +66,10 @@
       this.parseButton.Click += new System.EventHandler(this.ParseButtonClick);
       // 
-      // errorLabel
+      // infoLabel
       // 
       this.infoLabel.AutoSize = true;
-      this.infoLabel.Location = new System.Drawing.Point(155, 50);
-      this.infoLabel.Name = "errorLabel";
+      this.infoLabel.BackColor = System.Drawing.Color.White;
+      this.infoLabel.Location = new System.Drawing.Point(3, 74);
+      this.infoLabel.Name = "infoLabel";
       this.infoLabel.Size = new System.Drawing.Size(54, 13);
       this.infoLabel.TabIndex = 4;
@@ -75,7 +78,8 @@
       // templateStructureGroupBox
       // 
+      this.templateStructureGroupBox.Controls.Add(this.linearScalingCheckBox);
+      this.templateStructureGroupBox.Controls.Add(this.infoLabel);
       this.templateStructureGroupBox.Controls.Add(this.treeChart);
       this.templateStructureGroupBox.Controls.Add(this.parseButton);
-      this.templateStructureGroupBox.Controls.Add(this.infoLabel);
       this.templateStructureGroupBox.Controls.Add(this.expressionInput);
       this.templateStructureGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -87,4 +91,15 @@
       this.templateStructureGroupBox.Text = "Template Structure";
       // 
+      // linearScalingCheckBox
+      // 
+      this.linearScalingCheckBox.AutoSize = true;
+      this.linearScalingCheckBox.Location = new System.Drawing.Point(149, 49);
+      this.linearScalingCheckBox.Name = "linearScalingCheckBox";
+      this.linearScalingCheckBox.Size = new System.Drawing.Size(122, 17);
+      this.linearScalingCheckBox.TabIndex = 8;
+      this.linearScalingCheckBox.Text = "Apply Linear Scaling";
+      this.linearScalingCheckBox.UseVisualStyleBackColor = true;
+      this.linearScalingCheckBox.CheckStateChanged += new System.EventHandler(this.LinearScalingCheckBoxCheckStateChanged);
+      // 
       // treeChart
       // 
@@ -94,5 +109,5 @@
       this.treeChart.BackgroundColor = System.Drawing.Color.White;
       this.treeChart.LineColor = System.Drawing.Color.Black;
-      this.treeChart.Location = new System.Drawing.Point(6, 74);
+      this.treeChart.Location = new System.Drawing.Point(3, 74);
       this.treeChart.MinimumHorizontalDistance = 30;
       this.treeChart.MinimumHorizontalPadding = 20;
@@ -102,5 +117,5 @@
       this.treeChart.PreferredNodeHeight = 46;
       this.treeChart.PreferredNodeWidth = 70;
-      this.treeChart.Size = new System.Drawing.Size(288, 320);
+      this.treeChart.Size = new System.Drawing.Size(291, 320);
       this.treeChart.SuspendRepaint = false;
       this.treeChart.TabIndex = 7;
@@ -180,4 +195,5 @@
     private MainForm.WindowsForms.ViewHost viewHost;
     private System.Windows.Forms.GroupBox detailsGroupBox;
+    private System.Windows.Forms.CheckBox linearScalingCheckBox;
   }
 }
Index: /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs
===================================================================
--- /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs	(revision 18068)
+++ /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs	(revision 18069)
@@ -42,4 +42,5 @@
       if (Content == null) return;
       expressionInput.Text = Content.Template;
+      linearScalingCheckBox.Checked = Content.ApplyLinearScaling;
       PaintTree();
       infoLabel.Text = "";
@@ -47,15 +48,5 @@
 
     private void ParseButtonClick(object sender, EventArgs e) {
-      if(!string.IsNullOrEmpty(expressionInput.Text)) {
-        try {
-          Content.Template = expressionInput.Text;
-          PaintTree();
-          infoLabel.Text = "Template structure successfully parsed.";
-          infoLabel.ForeColor = Color.DarkGreen;
-        } catch (Exception ex) {
-          infoLabel.Text = ex.Message;
-          infoLabel.ForeColor = Color.DarkRed;
-        }
-      }
+      Parse();
     }
 
@@ -79,4 +70,28 @@
       }
     }
+
+    private void ExpressionInputKeyUp(object sender, KeyEventArgs e) {
+      if (e.KeyCode == Keys.Enter)
+        Parse();
+    }
+
+    private void Parse() {
+      if (!string.IsNullOrEmpty(expressionInput.Text)) {
+        try {
+          Content.Template = expressionInput.Text;
+          PaintTree();
+          infoLabel.Text = "Template structure successfully parsed.";
+          infoLabel.ForeColor = Color.DarkGreen;
+        } catch (Exception ex) {
+          infoLabel.Text = ex.Message;
+          infoLabel.ForeColor = Color.DarkRed;
+        }
+      }
+    }
+
+    private void LinearScalingCheckBoxCheckStateChanged(object sender, EventArgs e) {
+      Content.ApplyLinearScaling = linearScalingCheckBox.Checked;
+      PaintTree();
+    }
   }
 }
Index: /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/StructureTemplate.cs
===================================================================
--- /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/StructureTemplate.cs	(revision 18068)
+++ /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/StructureTemplate.cs	(revision 18069)
@@ -19,6 +19,5 @@
       set {
         template = value;
-        tree = Parser.Parse(template);
-        GetSubFunctions(Tree);
+        Tree = Parser.Parse(template);
         OnChanged();
       } 
@@ -26,9 +25,29 @@
 
     [Storable]
-    private ISymbolicExpressionTree tree;
-    public ISymbolicExpressionTree Tree => tree;
+    private ISymbolicExpressionTree treeWithoutLinearScaling;
+    [Storable]
+    private ISymbolicExpressionTree treeWithLinearScaling;
+    public ISymbolicExpressionTree Tree {
+      get => ApplyLinearScaling ? treeWithLinearScaling : treeWithoutLinearScaling;
+      private set {
+        treeWithLinearScaling = AddLinearScalingTerms(value);
+        treeWithoutLinearScaling = value;
+        SubFunctions = GetSubFunctions();
+      }
+    }
 
     [Storable]
-    public IReadOnlyDictionary<string, SubFunction> SubFunctions { get; private set; } = new Dictionary<string, SubFunction>();
+    public IReadOnlyDictionary<string, SubFunction> SubFunctions { get; private set; }
+
+    [Storable]
+    private bool applyLinearScaling = false;
+    public bool ApplyLinearScaling {
+      get => applyLinearScaling;
+      set {
+        applyLinearScaling = value;
+        //subFunctions = GetSubFunctions();
+        OnChanged();
+      }
+    }
 
     protected InfixExpressionParser Parser { get; set; } = new InfixExpressionParser();
@@ -56,7 +75,7 @@
     #endregion
 
-    private void GetSubFunctions(ISymbolicExpressionTree tree) {
+    private Dictionary<string, SubFunction> GetSubFunctions() {
       var subFunctions = new Dictionary<string, SubFunction>();
-      foreach (var node in tree.IterateNodesPrefix())
+      foreach (var node in Tree.IterateNodesPrefix())
         if (node is SubFunctionTreeNode subFunctionTreeNode) {
           if (!subFunctionTreeNode.Arguments.Any())
@@ -77,5 +96,33 @@
           }
         }
-      SubFunctions = subFunctions;
+      return subFunctions;
+    }
+
+    private ISymbolicExpressionTree AddLinearScalingTerms(ISymbolicExpressionTree tree) {
+      var clonedTree = (ISymbolicExpressionTree)tree.Clone();
+      var startNode = clonedTree.Root.Subtrees.First();
+      var template = startNode.Subtrees.First();
+
+      var add = new Addition();
+      var addNode = add.CreateTreeNode();
+
+      var mul = new Multiplication();
+      var mulNode = mul.CreateTreeNode();
+
+      var c1 = new Constant();
+      var c1Node = (ConstantTreeNode)c1.CreateTreeNode();
+      c1Node.Value = 0.0;
+      var c2 = new Constant();
+      var c2Node = (ConstantTreeNode)c2.CreateTreeNode();
+      c2Node.Value = 1.0;
+      
+      addNode.AddSubtree(c1Node);
+      addNode.AddSubtree(mulNode);
+      mulNode.AddSubtree(c2Node);
+        
+      startNode.RemoveSubtree(0);
+      startNode.AddSubtree(addNode);
+      mulNode.AddSubtree(template);
+      return clonedTree;
     }
 
Index: /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/SubFunction.cs
===================================================================
--- /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/SubFunction.cs	(revision 18068)
+++ /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/SubFunction.cs	(revision 18069)
@@ -42,4 +42,5 @@
     }
 
+    [Storable]
     public IEnumerable<string> Arguments { get; set; }
     #endregion
@@ -63,5 +64,7 @@
     private void OnParameterValueChanged(object sender, EventArgs e) => Changed?.Invoke(this, EventArgs.Empty);
 
-    protected SubFunction(SubFunction original, Cloner cloner) { }
+    protected SubFunction(SubFunction original, Cloner cloner) {
+      Arguments = original.Arguments;
+    }
 
     [StorableConstructor]
Index: /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubFunctionTreeNode.cs
===================================================================
--- /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubFunctionTreeNode.cs	(revision 18068)
+++ /branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/SubFunctionTreeNode.cs	(revision 18069)
@@ -15,6 +15,8 @@
     public new SubFunctionSymbol Symbol => (SubFunctionSymbol)base.Symbol;
 
+    [Storable]
     public IEnumerable<string> Arguments { get; set; } = Enumerable.Empty<string>();
     
+    [Storable]
     public string Name { get; set; }
     #endregion
@@ -26,5 +28,8 @@
     protected SubFunctionTreeNode(StorableConstructorFlag _) : base(_) { }
 
-    protected SubFunctionTreeNode(SubFunctionTreeNode original, Cloner cloner) : base(original, cloner) { }
+    protected SubFunctionTreeNode(SubFunctionTreeNode original, Cloner cloner) : base(original, cloner) {
+      Arguments = original.Arguments;
+      Name = (string)original.Name.Clone();
+    }
     #endregion
 
