Index: branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/StructuredSymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/StructuredSymbolicRegressionSingleObjectiveProblem.cs	(revision 18074)
+++ branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/StructuredSymbolicRegressionSingleObjectiveProblem.cs	(revision 18075)
@@ -12,4 +12,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
@@ -17,10 +18,10 @@
   [Item(Name = "Structured Symbolic Regression Single Objective Problem (single-objective)", Description = "A problem with a structural definition and unfixed subfunctions.")]
   [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 150)]
-  public class StructuredSymbolicRegressionSingleObjectiveProblem : SingleObjectiveBasicProblem<MultiEncoding>, IRegressionProblem, IProblemInstanceConsumer<RegressionProblemData> {
+  public class StructuredSymbolicRegressionSingleObjectiveProblem : SingleObjectiveBasicProblem<MultiEncoding>, IRegressionProblem, IProblemInstanceConsumer<IRegressionProblemData> {
 
     #region Constants
     private const string ProblemDataParameterName = "ProblemData";
-    private const string StructureDefinitionParameterName = "Structure Definition";
     private const string StructureTemplateParameterName = "Structure Template";
+    private const string InterpreterParameterName = "Interpreter";
 
     private const string StructureTemplateDescriptionText = 
@@ -33,6 +34,6 @@
     #region Parameters
     public IValueParameter<IRegressionProblemData> ProblemDataParameter => (IValueParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName];
-    public IFixedValueParameter<StringValue> StructureDefinitionParameter => (IFixedValueParameter<StringValue>)Parameters[StructureDefinitionParameterName];
     public IFixedValueParameter<StructureTemplate> StructureTemplateParameter => (IFixedValueParameter<StructureTemplate>)Parameters[StructureTemplateParameterName];
+    public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> InterpreterParameter => (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[InterpreterParameterName];
     #endregion
 
@@ -46,14 +47,7 @@
     }
 
-    public string StructureDefinition {
-      get => StructureDefinitionParameter.Value.Value;
-      set => StructureDefinitionParameter.Value.Value = value;
-    }
-
-    public StructureTemplate StructureTemplate {
-      get => StructureTemplateParameter.Value;
-    }
-
-    public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; } = new SymbolicDataAnalysisExpressionTreeInterpreter();
+    public StructureTemplate StructureTemplate => StructureTemplateParameter.Value;
+
+    public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter => InterpreterParameter.Value;
 
     IParameter IDataAnalysisProblem.ProblemDataParameter => ProblemDataParameter;
@@ -74,9 +68,19 @@
       structureTemplate.Changed += OnTemplateChanged;
 
-      Parameters.Add(new ValueParameter<IRegressionProblemData>(ProblemDataParameterName, problemData));
-      Parameters.Add(new FixedValueParameter<StructureTemplate>(StructureTemplateParameterName, 
-        StructureTemplateDescriptionText, structureTemplate));
-
-
+      Parameters.Add(new ValueParameter<IRegressionProblemData>(
+        ProblemDataParameterName, 
+        problemData));
+
+      Parameters.Add(new FixedValueParameter<StructureTemplate>(
+        StructureTemplateParameterName, 
+        StructureTemplateDescriptionText, 
+        structureTemplate));
+
+      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(
+        InterpreterParameterName, 
+        new SymbolicDataAnalysisExpressionTreeInterpreter()) 
+        { Hidden = true });
+
+      ProblemDataParameter.ValueChanged += ProblemDataParameterValueChanged;
     }
 
@@ -93,4 +97,9 @@
     #endregion
 
+    private void ProblemDataParameterValueChanged(object sender, EventArgs e) {
+      StructureTemplate.Reset();
+      // InfoBox for Reset?
+    }
+
     private void OnTemplateChanged(object sender, EventArgs args) {
       SetupStructureTemplate();
@@ -103,6 +112,10 @@
       foreach (var f in StructureTemplate.SubFunctions.Values) {
         SetupVariables(f);
-        if(!Encoding.Encodings.Any(x => x.Name == f.Name)) // to prevent the same encoding twice
-          Encoding.Add(new SymbolicExpressionTreeEncoding(f.Name, f.Grammar, f.MaximumSymbolicExpressionTreeLength, f.MaximumSymbolicExpressionTreeDepth));
+        if (!Encoding.Encodings.Any(x => x.Name == f.Name)) // to prevent the same encoding twice
+          Encoding.Add(new SymbolicExpressionTreeEncoding(
+            f.Name, 
+            f.Grammar, 
+            f.MaximumSymbolicExpressionTreeLength, 
+            f.MaximumSymbolicExpressionTreeDepth));
       }
     }
@@ -133,5 +146,4 @@
         results.Add(new Result("Best Tree", tree));
       }
-        
     }
 
@@ -168,4 +180,7 @@
 
     private ISymbolicExpressionTree BuildTree(Individual individual) {
+      if (StructureTemplate.Tree == null)
+        throw new ArgumentException("No structure template defined!");
+
       var templateTree = (ISymbolicExpressionTree)StructureTemplate.Tree.Clone();
 
@@ -175,13 +190,8 @@
           var subFunctionTreeNode = n as SubFunctionTreeNode;
           var subFunctionTree = individual.SymbolicExpressionTree(subFunctionTreeNode.Name);
-          //var parent = n.Parent;
-
-          // remove SubFunctionTreeNode
-          //parent.RemoveSubtree(parent.IndexOfSubtree(subFunctionTreeNode));
 
           // add new tree
           var subTree = subFunctionTree.Root.GetSubtree(0)  // Start
                                             .GetSubtree(0); // Offset
-          //parent.AddSubtree(subTree);
           subFunctionTreeNode.AddSubtree(subTree);
         }
@@ -223,8 +233,5 @@
     }
 
-    public void Load(RegressionProblemData data) {
-      ProblemData = data;
-      SetupStructureTemplate();
-    }
+    public void Load(IRegressionProblemData data) => ProblemData = data;
   }
 }
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 18074)
+++ branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs	(revision 18075)
@@ -2,4 +2,5 @@
 using System.Collections.Generic;
 using System.Drawing;
+using System.Linq;
 using System.Text;
 using System.Windows.Forms;
@@ -25,6 +26,11 @@
       InitializeComponent();
       infoLabel.Text = "";
+      this.Resize += StructureTemplateViewResize;
       treeChart.SymbolicExpressionTreeNodeClicked += SymbolicExpressionTreeNodeClicked;
       
+    }
+
+    private void StructureTemplateViewResize(object sender, EventArgs e) {
+      PaintTree();
     }
 
@@ -83,4 +89,7 @@
           infoLabel.Text = "Template structure successfully parsed.";
           infoLabel.ForeColor = Color.DarkGreen;
+        } catch (AggregateException ex) {
+          infoLabel.Text = string.Join("\n", ex.InnerExceptions.Select(x => x.Message));
+          infoLabel.ForeColor = Color.DarkRed;
         } catch (Exception ex) {
           infoLabel.Text = ex.Message;
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 18074)
+++ branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/StructureTemplate.cs	(revision 18075)
@@ -14,5 +14,5 @@
     #region Properties
     [Storable]
-    private string template = "";
+    private string template;
     public string Template {
       get => template; 
@@ -38,8 +38,8 @@
 
     [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;
+    private bool applyLinearScaling;
     public bool ApplyLinearScaling {
       get => applyLinearScaling;
@@ -61,5 +61,7 @@
 
     #region Constructors
-    public StructureTemplate() { }
+    public StructureTemplate() {
+      Reset();
+    }
 
     [StorableConstructor]
@@ -79,5 +81,12 @@
     #endregion
 
-    
+    public void Reset() {
+      SubFunctions = new Dictionary<string, SubFunction>();
+      treeWithoutLinearScaling = null;
+      treeWithLinearScaling = null;
+      template = "";
+      applyLinearScaling = false;
+      OnChanged();
+    }
 
     private Dictionary<string, SubFunction> GetSubFunctions() {
