Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs	(revision 17477)
@@ -16,5 +16,8 @@
   internal static class Runner {
     internal static void Run(string template, string config, string outputFile) {
-      IOptimizer optimizer = JsonTemplateInstantiator.Instantiate(template, config, out IEnumerable<string> allowedResultNames);
+      InstantiatorResult instantiatorResult = JsonTemplateInstantiator.Instantiate(template, config);
+      IOptimizer optimizer = instantiatorResult.Optimizer;
+      IEnumerable<IResultJsonItem> configuredResultItem = instantiatorResult.ConfiguredResultItems;
+
       optimizer.Runs.Clear();
       if(optimizer is EngineAlgorithm e)
@@ -23,17 +26,18 @@
       Task task = optimizer.StartAsync();
       while(!task.IsCompleted) {
-        WriteResultsToFile(outputFile, optimizer, allowedResultNames);
+        WriteResultsToFile(outputFile, optimizer, configuredResultItem);
         Thread.Sleep(100);
       }
      
-      WriteResultsToFile(outputFile, optimizer, allowedResultNames);
+      WriteResultsToFile(outputFile, optimizer, configuredResultItem);
     }
 
-    private static void WriteResultsToFile(string file, IOptimizer optimizer, IEnumerable<string> allowedResultNames) =>
-      File.WriteAllText(file, FetchResults(optimizer, allowedResultNames));
+    private static void WriteResultsToFile(string file, IOptimizer optimizer, IEnumerable<IResultJsonItem> configuredResultItem) =>
+      File.WriteAllText(file, FetchResults(optimizer, configuredResultItem));
 
-    private static string FetchResults(IOptimizer optimizer, IEnumerable<string> allowedResultNames) {
+    private static string FetchResults(IOptimizer optimizer, IEnumerable<IResultJsonItem> configuredResultItem) {
       JArray arr = new JArray();
-      
+      IEnumerable<string> configuredResults = configuredResultItem.Select(x => x.Name);
+
       foreach (var run in optimizer.Runs) {
         JObject obj = new JObject();
@@ -41,5 +45,5 @@
         obj.Add("Run", JToken.FromObject(run.ToString()));
         foreach (var res in run.Results) {
-          if (allowedResultNames.Contains(res.Key)) {
+          if (configuredResults.Contains(res.Key)) {
             if (res.Value is ISymbolicRegressionSolution solution) {
               var formatter = new SymbolicDataAnalysisExpressionMATLABFormatter();
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/FileManager.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/FileManager.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/FileManager.cs	(revision 17477)
@@ -24,5 +24,4 @@
     }
     public static void ExportJsonTemplate(IContentView view) {
-      // TODO: view to select free params, warning if no results are generated
       IStorableContent content = view.Content as IStorableContent;
       if (!view.Locked && content != null) {
@@ -46,5 +45,5 @@
         try {
           var content = JsonTemplateInstantiator.Instantiate(openFileDialog.FileName);
-          IView view = MainFormManager.MainForm.ShowContent(content);
+          IView view = MainFormManager.MainForm.ShowContent(content.Optimizer);
           if (view == null)
             ErrorHandling.ShowErrorDialog("There is no view for the loaded item. It cannot be displayed.", new InvalidOperationException("No View Available"));
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/JsonItemVMBase.cs	(revision 17477)
@@ -13,6 +13,6 @@
   {
     IJsonItem IJsonItemVM.Item { 
-      get => item; 
-      set => item = (JsonItemType)value; 
+      get => Item; 
+      set => Item = (JsonItemType)value; 
     }
 
@@ -39,4 +39,5 @@
         if (TreeView != null)
           TreeView.Refresh();
+        SelectedChanged?.Invoke();
         OnPropertyChange(this, nameof(Selected));
       }
@@ -62,4 +63,5 @@
     public event PropertyChangedEventHandler PropertyChanged;
     public event Action ItemChanged;
+    public event Action SelectedChanged;
 
 
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ValueLookupJsonItemVM.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ValueLookupJsonItemVM.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/ValueLookupJsonItemVM.cs	(revision 17477)
@@ -10,5 +10,12 @@
     public override Type TargetedJsonItemType => typeof(ValueLookupJsonItem);
     public override UserControl Control => new ValueLookupJsonItemControl(this);
-    public IJsonItem JsonItemReference => ((IValueLookupJsonItem)Item).JsonItemReference;
+    public IJsonItem JsonItemReference => ((IValueLookupJsonItem)Item).ActualValue;
+
+    public ValueLookupJsonItemVM() {
+      base.SelectedChanged += () => {
+        if (JsonItemReference != null)
+          JsonItemReference.Active = base.Selected;
+      };
+    }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/ExportJsonDialog.cs	(revision 17477)
@@ -16,4 +16,6 @@
 namespace HeuristicLab.JsonInterface.OptimizerIntegration {
   public partial class ExportJsonDialog : Form {
+
+    #region Private Properties
     private static FolderBrowserDialog FolderBrowserDialog { get; set; }
     private IDictionary<TreeNode, UserControl> Node2Control { get; set; } = new Dictionary<TreeNode, UserControl>();
@@ -23,5 +25,5 @@
     private IOptimizer Optimizer { get; set; }
     private IList<IJsonItemVM> VMs { get; set; }
-    private JCGenerator Generator { get; set; } = new JCGenerator();
+    #endregion
 
     private IContent content;
@@ -31,7 +33,9 @@
         content = value;
 
+        #region Clear
         VMs = new List<IJsonItemVM>();
         treeView.Nodes.Clear();
         treeViewResults.Nodes.Clear();
+        #endregion
 
         Optimizer = content as IOptimizer;
@@ -45,7 +49,4 @@
       } 
     }
-
-    
-
 
     private void InitCache() {
@@ -85,5 +86,5 @@
 
         if (FolderBrowserDialog.ShowDialog() == DialogResult.OK) {
-          Generator.GenerateTemplate(FolderBrowserDialog.SelectedPath, textBoxTemplateName.Text, Optimizer, Root);
+          JCGenerator.GenerateTemplate(FolderBrowserDialog.SelectedPath, textBoxTemplateName.Text, Optimizer, Root);
           Close();
         }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.Designer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.Designer.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/JsonItemBoolControl.Designer.cs	(revision 17477)
@@ -37,4 +37,5 @@
       this.checkBoxValue.Margin = new System.Windows.Forms.Padding(0);
       this.checkBoxValue.Name = "checkBoxValue";
+      this.checkBoxValue.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1);
       this.checkBoxValue.Size = new System.Drawing.Size(400, 22);
       this.checkBoxValue.TabIndex = 19;
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/LookupJsonItemControl.Designer.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/LookupJsonItemControl.Designer.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/Views/LookupJsonItemControl.Designer.cs	(revision 17477)
@@ -64,5 +64,5 @@
       this.tableLayoutPanel1.RowCount = 1;
       this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
-      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+      this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
       this.tableLayoutPanel1.Size = new System.Drawing.Size(416, 22);
       this.tableLayoutPanel1.TabIndex = 13;
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/BaseConverter.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/BaseConverter.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/BaseConverter.cs	(revision 17477)
@@ -18,69 +18,7 @@
 
     #region Helper
-    protected ValueType CastValue<ValueType>(object obj) {
-      if (obj is JToken)
-        return ((JToken)obj).ToObject<ValueType>();
-      else if (obj is IConvertible)
-        return (ValueType)Convert.ChangeType(obj, typeof(ValueType));
-      else return (ValueType)obj;
-    }
 
     protected IItem Instantiate(Type type, params object[] args) =>
       (IItem)Activator.CreateInstance(type,args);
-
-    
-    protected object GetMaxValue(Type t) {
-      TypeCode typeCode = Type.GetTypeCode(t);
-
-      if (t.IsEqualTo(typeof(PercentValue)))
-        return 1.0d;
-
-      if(t == typeof(IntValue)) {
-        return int.MaxValue;
-      }
-
-      switch (typeCode) {
-        case TypeCode.Int16: return short.MaxValue;
-        case TypeCode.Int32: return int.MaxValue;
-        case TypeCode.Int64: return long.MaxValue;
-        case TypeCode.UInt16: return ushort.MaxValue;
-        case TypeCode.UInt32: return uint.MaxValue;
-        case TypeCode.UInt64: return ulong.MaxValue;
-        case TypeCode.Single: return float.MaxValue;
-        case TypeCode.Double: return double.MaxValue;
-        case TypeCode.Decimal: return decimal.MaxValue;
-        case TypeCode.Byte: return byte.MaxValue;
-        case TypeCode.Boolean: return true;
-        default: return GetDefaultValue(t);
-      }
-    }
-
-    protected object GetMinValue(Type t) {
-      TypeCode typeCode = Type.GetTypeCode(t);
-
-      if (t.IsEqualTo(typeof(PercentValue)))
-        return 0.0d;
-
-      if (t == typeof(IntValue)) {
-        return int.MinValue;
-      }
-
-      switch (typeCode) {
-        case TypeCode.Int16: return short.MinValue;
-        case TypeCode.Int32: return int.MinValue;
-        case TypeCode.Int64: return long.MinValue;
-        case TypeCode.UInt16: return ushort.MinValue;
-        case TypeCode.UInt32: return uint.MinValue;
-        case TypeCode.UInt64: return ulong.MinValue;
-        case TypeCode.Single: return float.MinValue;
-        case TypeCode.Double: return double.MinValue;
-        case TypeCode.Decimal: return decimal.MinValue;
-        case TypeCode.Byte: return byte.MinValue;
-        case TypeCode.Boolean: return false;
-        default: return GetDefaultValue(t);
-      }
-    }
-
-    protected object GetDefaultValue(Type t) => t.IsValueType ? Activator.CreateInstance(t) : null;
     #endregion
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ConstrainedValueParameterConverter.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ConstrainedValueParameterConverter.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ConstrainedValueParameterConverter.cs	(revision 17477)
@@ -16,11 +16,11 @@
       IParameter parameter = item as IParameter;
       foreach (var x in GetValidValues(parameter))
-        if(x.ToString() == CastValue<string>(cdata.Value))
+        if(x.ToString() == cdata.Value)
           parameter.ActualValue = x;
 
-      if (parameter.ActualValue != null && /*parameter.ActualValue is IParameterizedItem &&*/ cdata.Children != null) {
-        foreach(var param in cdata.Children) {
-          if(param.Name == parameter.ActualValue.ItemName)
-            root.Inject(parameter.ActualValue, param, root);
+      if (parameter.ActualValue != null && parameter.ActualValue is IParameterizedItem && cdata.Children != null) {
+        foreach(var child in cdata.Children) {
+          if(child.Name == parameter.ActualValue.ItemName) // name kann verändert werden? egal da bei inject der original name vorhanden ist
+            root.Inject(parameter.ActualValue, child, root);
         }
       }
@@ -36,5 +36,5 @@
         ConcreteRestrictedItems = GetValidValues(parameter).Select(x => x.ToString())
       };
-      item.AddChildren(GetParameterizedChilds(parameter));
+      item.AddChildren(GetParameterizedChilds(parameter, root));
 
       return item;
@@ -49,10 +49,10 @@
     }
 
-    private IList<IJsonItem> GetParameterizedChilds(IParameter value) {
+    private IList<IJsonItem> GetParameterizedChilds(IParameter value, IJsonItemConverter root) {
       List<IJsonItem> list = new List<IJsonItem>();
       var values = ((dynamic)value).ValidValues;
       foreach(var x in values) {
-        if (x is IParameterizedItem) {
-          IJsonItem tmp = JsonItemConverter.Extract(x);
+        if (x is IParameterizedItem) { // only makes sense for IParameterizedItems to go deeper
+          IJsonItem tmp = root.Extract(x, root);
           if(!(tmp is UnsupportedJsonItem))
             list.Add(tmp);
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs	(revision 17477)
@@ -15,6 +15,6 @@
       IValueLookupJsonItem lookupItem = data as IValueLookupJsonItem;
       param.ActualName = lookupItem.ActualName;
-      if (param.Value != null)
-        root.Inject(param.Value, lookupItem.JsonItemReference, root);
+      if (param.Value != null && lookupItem.ActualValue != null)
+        root.Inject(param.Value, lookupItem.ActualValue, root);
     }
 
@@ -26,6 +26,7 @@
       if (param.Value != null) {
         IJsonItem tmp = root.Extract(param.Value, root);
-        item.AddChildren(tmp.Children);
-        item.JsonItemReference = tmp;
+        tmp.Parent = item;
+        //item.AddChildren(tmp.Children);
+        item.ActualValue = tmp;
       }
       item.Name = param.Name;
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeArrayConverter.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeArrayConverter.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeArrayConverter.cs	(revision 17477)
@@ -16,10 +16,10 @@
     public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
       IntArray arr = item as IntArray;
-      int[] d = CastValue<int[]>(data);
+      IntArrayJsonItem intArrayItem = data as IntArrayJsonItem;
       bool resizeTmp = arr.Resizable;
       arr.Resizable = true;
-      arr.Length = d.Length;
-      for (int i = 0; i < d.Length; ++i)
-        arr[i] = d[i];
+      arr.Length = intArrayItem.Value.Length;
+      for (int i = 0; i < intArrayItem.Value.Length; ++i)
+        arr[i] = intArrayItem.Value[i];
       arr.Resizable = resizeTmp;
     }
@@ -27,5 +27,5 @@
     public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
       new IntArrayJsonItem() {
-        Name = "[OverridableParamName]",
+        Name = value.ItemName,
         Description = value.ItemDescription,
         Value = ((IntArray)value).CloneAsArray(),
@@ -41,12 +41,10 @@
     public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
       DoubleArray arr = item as DoubleArray;
-      DoubleArrayJsonItem doubleItem = data as DoubleArrayJsonItem;
-      //double[] d = CastValue<double[]>(data);
+      DoubleArrayJsonItem doubleArrayItem = data as DoubleArrayJsonItem;
       bool resizeTmp = arr.Resizable;
       arr.Resizable = true;
-      //arr.Length = d.Length;
-      arr.Length = doubleItem.Value.Length;
-      for (int i = 0; i < doubleItem.Value.Length; ++i)
-        arr[i] = doubleItem.Value[i];
+      arr.Length = doubleArrayItem.Value.Length;
+      for (int i = 0; i < doubleArrayItem.Value.Length; ++i)
+        arr[i] = doubleArrayItem.Value[i];
       arr.Resizable = resizeTmp;
     }
@@ -54,5 +52,5 @@
     public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
       new DoubleArrayJsonItem() {
-        Name = "[OverridableParamName]",
+        Name = value.ItemName,
         Description = value.ItemDescription,
         Value = ((DoubleArray)value).CloneAsArray(),
@@ -68,10 +66,10 @@
     public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
       PercentArray arr = item as PercentArray;
-      double[] d = CastValue<double[]>(data);
+      DoubleArrayJsonItem doubleArrayItem = data as DoubleArrayJsonItem;
       bool resizeTmp = arr.Resizable;
       arr.Resizable = true;
-      arr.Length = d.Length;
-      for (int i = 0; i < d.Length; ++i)
-        arr[i] = d[i];
+      arr.Length = doubleArrayItem.Value.Length;
+      for (int i = 0; i < doubleArrayItem.Value.Length; ++i)
+        arr[i] = doubleArrayItem.Value[i];
       arr.Resizable = resizeTmp;
     }
@@ -79,5 +77,5 @@
     public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
       new DoubleArrayJsonItem() {
-        Name = "[OverridableParamName]",
+        Name = value.ItemName,
         Description = value.ItemDescription,
         Value = ((PercentArray)value).CloneAsArray(),
@@ -93,10 +91,10 @@
     public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) {
       BoolArray arr = item as BoolArray;
-      bool[] d = CastValue<bool[]>(data);
+      BoolArrayJsonItem boolArrayItem = data as BoolArrayJsonItem;
       bool resizeTmp = arr.Resizable;
       arr.Resizable = true;
-      arr.Length = d.Length;
-      for(int i = 0; i < d.Length; ++i)
-        arr[i] = d[i];
+      arr.Length = boolArrayItem.Value.Length;
+      for(int i = 0; i < boolArrayItem.Value.Length; ++i)
+        arr[i] = boolArrayItem.Value[i];
       arr.Resizable = resizeTmp;
     }
@@ -104,5 +102,4 @@
     public override IJsonItem Extract(IItem value, IJsonItemConverter root) =>
       new BoolArrayJsonItem() {
-        //Name = "[OverridableParamName]",
         Name = value.ItemName,
         Description = value.ItemDescription,
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IIntervalRestrictedJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IIntervalRestrictedJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IIntervalRestrictedJsonItem.cs	(revision 17477)
@@ -7,6 +7,5 @@
 namespace HeuristicLab.JsonInterface {
   public interface IIntervalRestrictedJsonItem<T> : IJsonItem
-    where T : IComparable 
-  {
+    where T : IComparable {
     T Minimum { get; set; }
     T Maximum { get; set; }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItem.cs	(revision 17477)
@@ -1,3 +1,4 @@
 ﻿using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
@@ -8,5 +9,6 @@
 
 namespace HeuristicLab.JsonInterface {
-  public interface IJsonItem {
+  [JsonObject]
+  public interface IJsonItem : IEnumerable<IJsonItem> {
     bool Active { get; set; }
     string Name { get; set; }
@@ -23,9 +25,5 @@
     [JsonIgnore]
     IJsonItem Parent { get; set; }
-
-    //object Value { get; set; }
-
-    //IEnumerable<object> Range { get; set; }
-    
+        
     IJsonItemValidator GetValidator();
 
@@ -46,5 +44,6 @@
     void LoosenPath();
 
-    void SetFromJObject(JObject jObject);
+    JObject GenerateJObject();
+    void SetJObject(JObject jObject);
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueJsonItem.cs	(revision 17477)
@@ -8,10 +8,8 @@
   public interface IValueJsonItem : IJsonItem {
     object Value { get; set; }
-    //IEnumerable<object> Range { get; set; }
   }
 
   public interface IValueJsonItem<T> : IValueJsonItem {
     new T Value { get; set; }
-    //new IEnumerable<T> Range { get; set; }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueLookupJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueLookupJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IValueLookupJsonItem.cs	(revision 17477)
@@ -9,5 +9,5 @@
   public interface IValueLookupJsonItem : ILookupJsonItem {
     [JsonIgnore]
-    IJsonItem JsonItemReference { get; set; }
+    IJsonItem ActualValue { get; set; }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs	(revision 17477)
@@ -17,12 +17,12 @@
   public class JCGenerator {
 
-    public void GenerateTemplate(string path, IOptimizer optimizer) =>
+    public static void GenerateTemplate(string path, IOptimizer optimizer) =>
       GenerateTemplate(path, optimizer.Name, optimizer);
 
-    public void GenerateTemplate(string path, string templateName, IOptimizer optimizer) =>
+    public static void GenerateTemplate(string path, string templateName, IOptimizer optimizer) =>
       GenerateTemplate(path, templateName, optimizer, JsonItemConverter.Extract(optimizer));
 
-    public void GenerateTemplate(string path, string templateName, IOptimizer optimizer, IJsonItem rootItem) {
-      // init
+    public static void GenerateTemplate(string path, string templateName, IOptimizer optimizer, IJsonItem rootItem) {
+      #region Init
       JObject template = JObject.Parse(Constants.Template);
       JArray parameterItems = new JArray();
@@ -30,59 +30,44 @@
       IList<IJsonItem> jsonItems = new List<IJsonItem>();
       string fullPath = Path.GetFullPath(path);
-      
+      #endregion
+
       // recursively filter items with values/ranges/actualNames
       PopulateJsonItems(rootItem, jsonItems);
 
-      // serialize hl file
+      #region Serialize HL File
       ProtoBufSerializer serializer = new ProtoBufSerializer();
       string hlFilePath = fullPath + @"\" + templateName + ".hl";
       serializer.Serialize(optimizer, hlFilePath);
+      #endregion
 
-      // filter result items
+      #region Filter Items
       foreach (var item in jsonItems) {
         if (item is IResultJsonItem)
-          resultItems.Add(Serialize(item));
+          resultItems.Add(item.GenerateJObject());
         else
-          parameterItems.Add(Serialize(item));
+          parameterItems.Add(item.GenerateJObject());
       }
-      
-      // set template data
+      #endregion
+
+      #region Set Template Data
       template[Constants.Metadata][Constants.TemplateName] = templateName;
       template[Constants.Metadata][Constants.HLFileLocation] = hlFilePath;
       template[Constants.Parameters] = parameterItems;
       template[Constants.Results] = resultItems;
+      #endregion
 
-      // serialize template and write file
+      #region Serialize and write to file
       File.WriteAllText(fullPath + @"\" + templateName + ".json", SingleLineArrayJsonWriter.Serialize(template));
+      #endregion
     }
 
     #region Helper    
-    // serializes ParameterizedItems and saves them in list "JsonItems".
-    private void PopulateJsonItems(IJsonItem item, IList<IJsonItem> jsonItems) {
-      IEnumerable<IJsonItem> children = item.Children;
-      
-      if (item.Active && !(item is EmptyJsonItem)) {
-        jsonItems.Add(item);
-      }
-
-      if (children != null) {
-        foreach (var p in children) {
-          PopulateJsonItems(p, jsonItems);
+    private static void PopulateJsonItems(IJsonItem item, IList<IJsonItem> jsonItems) {
+      foreach(var x in item) {
+        if (x.Active && !(x is EmptyJsonItem)) {
+          jsonItems.Add(x);
         }
       }
     }
-
-    private static JObject Serialize(IJsonItem item) => 
-      JObject.FromObject(item, Settings());
-
-    /// <summary>
-    /// Settings for the json serialization.
-    /// </summary>
-    /// <returns>A configured JsonSerializer.</returns>
-    private static JsonSerializer Settings() => new JsonSerializer() {
-      TypeNameHandling = TypeNameHandling.None,
-      NullValueHandling = NullValueHandling.Ignore,
-      ReferenceLoopHandling = ReferenceLoopHandling.Serialize
-    };
     #endregion
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs	(revision 17477)
@@ -14,23 +14,20 @@
 
 namespace HeuristicLab.JsonInterface {
-  /// <summary>
-  /// Static class to instantiate an IAlgorithm object with a json interface template and config.
-  /// </summary>
-  public static class JsonTemplateInstantiator {
-    private struct InstData {
-      public JToken Template { get; set; }
-      public JArray Config { get; set; }
-      public IDictionary<string, IJsonItem> Objects { get; set; }
-      public IOptimizer Optimizer { get; set; }
-    }
-
-    public static IOptimizer Instantiate(string templateFile) =>
-      Instantiate(templateFile, null, out IEnumerable<string> allowedResultNames);
+  public struct InstantiatorResult {
+    public IOptimizer Optimizer { get; set; }
+    public IEnumerable<IResultJsonItem> ConfiguredResultItems { get; set; }
+  }
 
 
-    public static IOptimizer Instantiate(string templateFile, out IEnumerable<string> allowedResultNames) =>
-      Instantiate(templateFile, null, out allowedResultNames);
+  /// <summary>
+  /// Class to instantiate an IAlgorithm object with a json interface template and config.
+  /// </summary>
+  public class JsonTemplateInstantiator {
 
-   
+    #region Private Properties
+    private JToken Template { get; set; }
+    private JArray Config { get; set; }
+    private IDictionary<string, IJsonItem> Objects { get; set; } = new Dictionary<string, IJsonItem>();
+    #endregion
 
     /// <summary>
@@ -40,79 +37,76 @@
     /// <param name="configFile">Config file (json) for the template.</param>
     /// <returns>confugrated IOptimizer object</returns>
-    public static IOptimizer Instantiate(string templateFile, string configFile, out IEnumerable<string> allowedResultNames) {
-      InstData instData = new InstData() {
-        Objects = new Dictionary<string, IJsonItem>()
-      };
-
-      // parse template and config files
-      instData.Template = JToken.Parse(File.ReadAllText(templateFile));
-      if(!string.IsNullOrEmpty(configFile))
-        instData.Config = JArray.Parse(File.ReadAllText(configFile));
-
-      // extract metadata information
-      string hLFileLocation = Path.GetFullPath(instData.Template[Constants.Metadata][Constants.HLFileLocation].ToString());
-
-      // deserialize hl file
-      ProtoBufSerializer serializer = new ProtoBufSerializer();
-      IOptimizer optimizer = (IOptimizer)serializer.Deserialize(hLFileLocation);
-      instData.Optimizer = optimizer;
-
-      // collect all parameterizedItems from template
-      CollectParameterizedItems(instData);
-      
-      // if config != null -> merge Template and Config 
-      if (instData.Config != null)
-        MergeTemplateWithConfig(instData);
-
-      // get algorthm data and object
-      IJsonItem optimizerData = instData.Objects.First().Value;
-      
-      // inject configuration
-      JsonItemConverter.Inject(optimizer, optimizerData);
-
-      allowedResultNames = CollectResults(instData);
-
-      return optimizer;
+    public static InstantiatorResult Instantiate(string templateFile, string configFile = null) {
+      JsonTemplateInstantiator instantiator = new JsonTemplateInstantiator();
+      return instantiator.ExecuteInstantiaton(templateFile, configFile);
     }
 
     #region Helper
-    private static IEnumerable<string> CollectResults(InstData instData) {
-      IList<string> res = new List<string>();
-      foreach(JObject obj in instData.Template[Constants.Results]) {
-        res.Add(obj.Property("Name").Value.ToString());
+    private InstantiatorResult ExecuteInstantiaton(string templateFile, string configFile = null) {
+      InstantiatorResult result = new InstantiatorResult();
+
+      #region Parse Files
+      Template = JToken.Parse(File.ReadAllText(templateFile));
+      if(!string.IsNullOrEmpty(configFile))
+        Config = JArray.Parse(File.ReadAllText(configFile));
+      #endregion
+
+      // extract metadata information
+      string hLFileLocation = Path.GetFullPath(Template[Constants.Metadata][Constants.HLFileLocation].ToString());
+
+      #region Deserialize HL File
+      ProtoBufSerializer serializer = new ProtoBufSerializer();
+      IOptimizer optimizer = (IOptimizer)serializer.Deserialize(hLFileLocation);
+      result.Optimizer = optimizer;
+      #endregion
+
+      // collect all parameterizedItems from template
+      CollectParameterizedItems(optimizer);
+      
+      if (Config != null)
+        MergeTemplateWithConfig();
+
+      // get algorithm root item
+      IJsonItem rootItem = Objects.First().Value;
+      
+      // inject configuration
+      JsonItemConverter.Inject(optimizer, rootItem);
+
+      result.ConfiguredResultItems = CollectResults();
+
+      return result;
+    }
+
+    
+    private IEnumerable<IResultJsonItem> CollectResults() {
+      IList<IResultJsonItem> res = new List<IResultJsonItem>();
+      foreach(JObject obj in Template[Constants.Results]) {
+        string name = obj.Property("Name").Value.ToString();
+        res.Add(new ResultJsonItem() { Name = name });
       }
       return res;
     }
 
-    private static void CollectParameterizedItems(InstData instData) {
-      IJsonItem root = JsonItemConverter.Extract(instData.Optimizer);
-      instData.Objects.Add(root.Path, root);
+    private void CollectParameterizedItems(IOptimizer optimizer) {
+      IJsonItem root = JsonItemConverter.Extract(optimizer);
+      Objects.Add(root.Path, root);
 
-      foreach (JObject obj in instData.Template[Constants.Parameters]) {
-        string[] pathParts = obj.Property("Path").Value.ToString().Split('.');
-        IJsonItem tmp = root;
-        IJsonItem old = null;
-        for(int i = 1; i < pathParts.Length; ++i) {
-          foreach(var c in tmp.Children) {
-            if (c.Name == pathParts[i])
-              tmp = c;
+      foreach (JObject obj in Template[Constants.Parameters]) {
+        string path = obj.Property("Path").Value.ToString();
+        foreach(var tmp in root) {
+          if(tmp.Path == path) {
+            tmp.SetJObject(obj);
+            Objects.Add(tmp.Path, tmp);
           }
-          if (old == tmp)
-            throw new Exception($"Invalid path '{string.Join(".", pathParts)}'");
-          else old = tmp;
         }
-        tmp.SetFromJObject(obj);
-        instData.Objects.Add(tmp.Path, tmp);
       }
-      //IList<IJsonItem> faultyItems = new List<IJsonItem>();
-      //root.GetValidator().Validate(ref faultyItems);
     }
     
-    private static void MergeTemplateWithConfig(InstData instData) {
-      foreach (JObject obj in instData.Config) {
+    private void MergeTemplateWithConfig() {
+      foreach (JObject obj in Config) {
         // build item from config object
         string path = obj.Property("Path").Value.ToString();
         // override default value
-        if (instData.Objects.TryGetValue(path, out IJsonItem param)) {
+        if (Objects.TryGetValue(path, out IJsonItem param)) {
           // remove fixed template parameter => dont allow to copy them from concrete config
           obj.Property(nameof(IIntervalRestrictedJsonItem<int>.Minimum))?.Remove();
@@ -120,5 +114,5 @@
           obj.Property(nameof(IConcreteRestrictedJsonItem<string>.ConcreteRestrictedItems))?.Remove();
           // merge
-          param.SetFromJObject(obj);
+          param.SetJObject(obj);
         } else throw new InvalidDataException($"No parameter with path='{path}' defined!");
       }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ArrayJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ArrayJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ArrayJsonItem.cs	(revision 17477)
@@ -9,6 +9,6 @@
   public abstract class ArrayJsonItem<T> : ValueJsonItem<T[]>, IArrayJsonItem {
     public virtual bool Resizable { get; set; }
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
       Resizable = (jObject[nameof(IArrayJsonItem.Resizable)]?.ToObject<bool>()).GetValueOrDefault();
     }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DateTimeJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DateTimeJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DateTimeJsonItem.cs	(revision 17477)
@@ -4,8 +4,27 @@
 using System.Text;
 using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
 
 namespace HeuristicLab.JsonInterface {
   public class DateTimeJsonItem : IntervalRestrictedValueJsonItem<DateTime> {
     protected override bool Validate() => Minimum.CompareTo(Value) >= 0 && Maximum.CompareTo(Value) <= 0;
+    
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(DateTime.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(DateTime.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = DateTime.MinValue;
+      Maximum = DateTime.MaxValue;
+      base.SetJObject(jObject);
+    }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs	(revision 17477)
@@ -4,22 +4,82 @@
 using System.Text;
 using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
 
 namespace HeuristicLab.JsonInterface {
-  public class DoubleJsonItem : IntervalRestrictedValueJsonItem<double> { }
-  public class DoubleArrayJsonItem : IntervalRestrictedArrayJsonItem<double> { }
-  public class DoubleRangeJsonItem : RangedJsonItem<double> { }
+  public class DoubleJsonItem : IntervalRestrictedValueJsonItem<double> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
 
+      if (Minimum.CompareTo(double.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(double.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = double.MinValue;
+      Maximum = double.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
+  public class DoubleArrayJsonItem : IntervalRestrictedArrayJsonItem<double> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(double.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(double.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = double.MinValue;
+      Maximum = double.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
+  public class DoubleRangeJsonItem : RangedJsonItem<double> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(double.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(double.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = double.MinValue;
+      Maximum = double.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
   public class DoubleMatrixJsonItem : IntervalRestrictedMatrixJsonItem<double> {
-    /*
-    protected override bool IsInRange() {
-      for (int c = 0; c < Value.Length; ++c) {
-        for (int r = 0; r < Value[c].Length; ++r) {
-          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
-            return false;
-        }
-      }
-      return true;
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(double.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(double.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
     }
-    */
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = double.MinValue;
+      Maximum = double.MaxValue;
+      base.SetJObject(jObject);
+    }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs	(revision 17477)
@@ -4,21 +4,82 @@
 using System.Text;
 using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
 
 namespace HeuristicLab.JsonInterface {
-  public class IntJsonItem : IntervalRestrictedValueJsonItem<int> { }
-  public class IntArrayJsonItem : IntervalRestrictedArrayJsonItem<int> { }
-  public class IntRangeJsonItem : RangedJsonItem<int> { }
+  public class IntJsonItem : IntervalRestrictedValueJsonItem<int> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(int.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(int.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = int.MinValue;
+      Maximum = int.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
+  public class IntArrayJsonItem : IntervalRestrictedArrayJsonItem<int> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(int.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(int.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = int.MinValue;
+      Maximum = int.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
+  public class IntRangeJsonItem : RangedJsonItem<int> {
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(int.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(int.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
+    }
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = int.MinValue;
+      Maximum = int.MaxValue;
+      base.SetJObject(jObject);
+    }
+  }
   public class IntMatrixJsonItem : IntervalRestrictedMatrixJsonItem<int> {
-    /*
-    protected override bool IsInRange() {
-      for (int c = 0; c < Value.Length; ++c) {
-        for (int r = 0; r < Value[c].Length; ++r) {
-          if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])
-            return false;
-        }
-      }
-      return true;
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+
+      if (Minimum.CompareTo(int.MinValue) == 0)
+        obj.Property("Minimum").Remove();
+
+      if (Maximum.CompareTo(int.MaxValue) == 0)
+        obj.Property("Maximum").Remove();
+
+      return obj;
     }
-    */
+
+    public override void SetJObject(JObject jObject) {
+      Minimum = int.MinValue;
+      Maximum = int.MaxValue;
+      base.SetJObject(jObject);
+    }
   }
 }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedArrayJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedArrayJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedArrayJsonItem.cs	(revision 17477)
@@ -20,8 +20,13 @@
     }
 
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
-      Minimum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)].ToObject<T>();
-      Maximum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)].ToObject<T>();
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
+
+      var minProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)];
+      if (minProp != null) Minimum = minProp.ToObject<T>();
+
+
+      var maxProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)];
+      if (maxProp != null) Maximum = maxProp.ToObject<T>();
     }
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedMatrixJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedMatrixJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedMatrixJsonItem.cs	(revision 17477)
@@ -20,8 +20,13 @@
       return true;
     }
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
-      Minimum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)].ToObject<T>();
-      Maximum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)].ToObject<T>();
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
+
+      var minProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)];
+      if (minProp != null) Minimum = minProp.ToObject<T>();
+
+
+      var maxProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)];
+      if (maxProp != null) Maximum = maxProp.ToObject<T>();
     }
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedValueJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedValueJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedValueJsonItem.cs	(revision 17477)
@@ -14,8 +14,13 @@
     protected override bool Validate() => Minimum.CompareTo(Value) <= 0 && Maximum.CompareTo(Value) >= 0;
 
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
-      Minimum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)].ToObject<T>();
-      Maximum = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)].ToObject<T>();
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
+
+      var minProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Minimum)];
+      if (minProp != null) Minimum = minProp.ToObject<T>();
+
+
+      var maxProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)];
+      if (maxProp != null) Maximum = maxProp.ToObject<T>();
     }
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs	(revision 17477)
@@ -62,9 +62,5 @@
       }
     }
-
-    //public virtual object Value { get; set; }
-
-    //public virtual IEnumerable<object> Range { get; set; }
-    
+        
     // TODO jsonIgnore dataType?
 
@@ -105,58 +101,32 @@
     public void LoosenPath() => fixedPath = "";
 
-    public virtual void SetFromJObject(JObject jObject) {
-      //Value = jObject[nameof(IJsonItem.Value)]?.ToObject<object>();
-      //Range = jObject[nameof(IJsonItem.Range)]?.ToObject<object[]>();
-    }
+    public virtual JObject GenerateJObject() =>
+      JObject.FromObject(this, new JsonSerializer() {
+        TypeNameHandling = TypeNameHandling.None,
+        NullValueHandling = NullValueHandling.Ignore,
+        ReferenceLoopHandling = ReferenceLoopHandling.Ignore
+      });
+
+    public virtual void SetJObject(JObject jObject) { }
     #endregion
 
-    #region Helper
-    /*
-     * TODO protected abstract bool Validate();
-     */
+    #region Abstract Methods
     protected abstract bool Validate();
-    /*
-    protected virtual bool IsInRange() {
-      bool b1 = true, b2 = true;
-      if (Value is IEnumerable && !(Value is string)) {
-        foreach (var x in (IEnumerable)Value) {
-          b1 = b1 ? IsInRangeList(x) : b1;
-          b2 = b2 ? IsInNumericRange(x) : b2;
+    #endregion
+
+    #region IEnumerable Support
+    public virtual IEnumerator<IJsonItem> GetEnumerator() {
+      yield return this;
+      
+      if (Children != null) {
+        foreach (var x in Children) {
+          foreach (var c in x) {
+            yield return c;
+          }
         }
-      } 
-      else {
-        b1 = IsInRangeList(Value); 
-        b2 = IsInNumericRange(Value);
-      } 
-      return b1 || b2;
+      }
     }
 
-    protected bool IsInRangeList(object value) {
-      foreach (var x in Range)
-        if (x.Equals(value)) return true;
-      return false;
-    }
-
-    protected bool IsInNumericRange(object value) =>
-      IsInNumericRange<ulong>(value)
-      || IsInNumericRange<uint>(value)
-      || IsInNumericRange<ushort>(value)
-      || IsInNumericRange<long>(value)
-      || IsInNumericRange<int>(value)
-      || IsInNumericRange<short>(value)
-      || IsInNumericRange<byte>(value)
-      || IsInNumericRange<float>(value)
-      || IsInNumericRange<double>(value)
-      || (value is float && float.IsNaN((float)value))
-      || (value is double && double.IsNaN((double)value));
-
-    protected bool IsInNumericRange<T>(object value) where T : IComparable {
-      object min = Range.First(), max = Range.Last();
-      return
-        value != null && min != null && max != null && value is T && min is T && max is T &&
-        (((T)min).CompareTo(value) == -1 || ((T)min).CompareTo(value) == 0) &&
-        (((T)max).CompareTo(value) == 1 || ((T)max).CompareTo(value) == 0);
-    }
-    */
+    IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
     #endregion
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/LookupJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/LookupJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/LookupJsonItem.cs	(revision 17477)
@@ -10,6 +10,6 @@
     public virtual string ActualName { get; set; }
 
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
       ActualName = jObject[nameof(ILookupJsonItem.ActualName)]?.ToString();
     }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItem.cs	(revision 17477)
@@ -23,6 +23,6 @@
     }
 
-    public override void SetFromJObject(JObject jObject) {
-      base.SetFromJObject(jObject);
+    public override void SetJObject(JObject jObject) {
+      base.SetJObject(jObject);
       RowsResizable = (jObject[nameof(IMatrixJsonItem.RowsResizable)]?.ToObject<bool>()).GetValueOrDefault();
       ColumnsResizable = (jObject[nameof(IMatrixJsonItem.ColumnsResizable)]?.ToObject<bool>()).GetValueOrDefault();
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueJsonItem.cs	(revision 17477)
@@ -10,9 +10,6 @@
     public object Value { get; set; }
 
-    //public IEnumerable<object> Range { get; set; }
-
-    public override void SetFromJObject(JObject jObject) {
+    public override void SetJObject(JObject jObject) {
       Value = jObject[nameof(IValueJsonItem.Value)]?.ToObject<object>();
-      //Range = jObject[nameof(IValueJsonItem.Range)]?.ToObject<object[]>();
     }
 
@@ -24,11 +21,4 @@
       set => base.Value = value;
     }
-
-    /*
-    public new IEnumerable<T> Range {
-      get => base.Range?.Cast<T>();
-      set => base.Range = value.Cast<object>();
-    }
-    */
 
     private T ConvertObject(object obj) {
@@ -42,8 +32,7 @@
     }
 
-    public override void SetFromJObject(JObject jObject) {
+    public override void SetJObject(JObject jObject) {
       if(jObject[nameof(IValueJsonItem<T>.Value)] != null)
         Value = jObject[nameof(IValueJsonItem<T>.Value)].ToObject<T>();
-      //Range = jObject[nameof(IValueJsonItem<T>.Range)]?.ToObject<T[]>();
     }
   }
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueLookupJsonItem.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueLookupJsonItem.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueLookupJsonItem.cs	(revision 17477)
@@ -5,14 +5,39 @@
 using System.Threading.Tasks;
 using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 
 namespace HeuristicLab.JsonInterface {
   public class ValueLookupJsonItem : LookupJsonItem, IValueLookupJsonItem {
-    [JsonIgnore]
-    public IJsonItem JsonItemReference { get; set; }
+    
+    public IJsonItem ActualValue { get; set; }
 
     protected override bool Validate() {
-      if (JsonItemReference == null) return true;
+      if (ActualValue == null) return true;
       IList<IJsonItem> faultyItems = new List<IJsonItem>();
-      return JsonItemReference.GetValidator().Validate(ref faultyItems);
+      return ActualValue.GetValidator().Validate(ref faultyItems);
+    }
+
+    public override JObject GenerateJObject() {
+      var obj = base.GenerateJObject();
+      if(ActualValue != null) {
+        var actualValue = ActualValue.GenerateJObject();
+        obj.Add(nameof(IValueLookupJsonItem.ActualValue), actualValue);
+      }
+      return obj;
+    }
+
+    public override IEnumerator<IJsonItem> GetEnumerator() {
+      using (var it = base.GetEnumerator()) {
+        while(it.MoveNext()) {
+          yield return it.Current;
+        }
+      }
+      if(ActualValue != null) {
+        using (var it = ActualValue.GetEnumerator()) {
+          while (it.MoveNext()) {
+            yield return it.Current;
+          }
+        }
+      }
     }
   }
Index: /branches/3026_IntegrationIntoSymSpace/Heuristiclab.ConfigStarter/Program.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/Heuristiclab.ConfigStarter/Program.cs	(revision 17476)
+++ /branches/3026_IntegrationIntoSymSpace/Heuristiclab.ConfigStarter/Program.cs	(revision 17477)
@@ -47,17 +47,11 @@
       IJsonItem root = JsonItemConverter.Extract(alg);
       ActivateJsonItems(root);
-      //var x = root.Children[0];
-      //root.Children.Remove(x);
-      //x.Parent = null;
 
-
-      JCGenerator generator = new JCGenerator();
-      generator.GenerateTemplate(@"C:\Workspace", "Template", alg, root);
-      //JsonTemplateInstantiator.Instantiate(@"C:\Workspace\Template.json");
+      JCGenerator.GenerateTemplate(@"C:\Workspace", "Template", alg, root);
       
       List<ICommandLineArgument> arguments = new List<ICommandLineArgument>();
       arguments.Add(new StartArgument("JsonInterface"));
       arguments.Add(new OpenArgument(@"C:\Workspace\Template.json"));
-      arguments.Add(new OpenArgument(@"C:\Workspace\ConfigProto1.json"));
+      arguments.Add(new OpenArgument(@"C:\Workspace\Config.json"));
       arguments.Add(new StringArgument(@"C:\Workspace\Output.json"));
 
@@ -67,8 +61,9 @@
 
     private static void ActivateJsonItems(IJsonItem item) {
-      item.Active = true;
-      if(item.Children != null) {
-        foreach (var x in item.Children)
-          ActivateJsonItems(x);
+      foreach (var x in item) {
+        x.Active = true;
+        if (x is ValueLookupJsonItem i) {
+          i.Active = true;
+        }
       }
     }
