Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab 3.3.sln
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab 3.3.sln	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab 3.3.sln	(revision 17330)
@@ -477,4 +477,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.JsonInterface.App", "HeuristicLab.JsonInterface.App\HeuristicLab.JsonInterface.App.csproj", "{039D995F-1AA5-4461-92B3-B466F612D998}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.JsonInterface.OptimizerIntegration", "HeuristicLab.JsonInterface.OptimizerIntegration\HeuristicLab.JsonInterface.OptimizerIntegration.csproj", "{5A3413F8-0928-4167-80E7-AAD9D6E38A94}"
 EndProject
 Global
@@ -2332,4 +2334,16 @@
 		{039D995F-1AA5-4461-92B3-B466F612D998}.Release|x86.ActiveCfg = Release|Any CPU
 		{039D995F-1AA5-4461-92B3-B466F612D998}.Release|x86.Build.0 = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|x64.Build.0 = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Debug|x86.Build.0 = Debug|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|x64.ActiveCfg = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|x64.Build.0 = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|x86.ActiveCfg = Release|Any CPU
+		{5A3413F8-0928-4167-80E7-AAD9D6E38A94}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Plugin.cs.frame
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Plugin.cs.frame	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Plugin.cs.frame	(revision 17330)
@@ -20,8 +20,4 @@
 #endregion
 
-using System;
-using System.IO;
-using HeuristicLab.JsonInterface;
-using HeuristicLab.Optimization;
 using HeuristicLab.PluginInfrastructure;
 
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs	(revision 17330)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs	(revision 17330)
@@ -0,0 +1,39 @@
+﻿using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.JsonInterface.App {
+  internal static class Runner {
+    internal static void Run(string template, string config, string outputFile = @"C:\Workspace\test.txt") {
+      JCInstantiator instantiator = new JCInstantiator();
+      IAlgorithm alg = instantiator.Instantiate(template, config);
+  
+      //alg.Start();
+      Task task = alg.StartAsync();
+      while(!task.IsCompleted) {
+        WriteResultsToFile(outputFile, alg);
+        Thread.Sleep(1000);
+      }
+      WriteResultsToFile(outputFile, alg);
+    }
+
+    private static void WriteResultsToFile(string file, IAlgorithm optimizer) =>
+      File.WriteAllText(file, FetchResults(optimizer));
+
+    private static string FetchResults(IAlgorithm optimizer) {
+      StringBuilder sb = new StringBuilder();
+      //foreach (var run in optimizer.Runs) {
+        //sb.AppendLine($"--- {run.ToString()} ---");
+        foreach (var res in optimizer.Results) {
+          sb.AppendLine($"{res.Name}: {res.Value}");
+        }
+      //}
+      return sb.ToString();
+    }
+  }
+}
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Constants.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Constants.cs	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Constants.cs	(revision 17330)
@@ -8,13 +8,13 @@
   internal class Constants {
 
-    public const string Metadata = "Metadata";
-    public const string Algorithm = "Algorithm";
-    public const string Problem = "Problem";
-    public const string Objects = "Objects";
-    public const string Types = "Types";
-    public const string StaticParameters = "StaticParameters";
-    public const string FreeParameters = "FreeParameters";
+    internal const string Metadata = "Metadata";
+    internal const string Algorithm = "Algorithm";
+    internal const string Problem = "Problem";
+    internal const string Objects = "Objects";
+    internal const string Types = "Types";
+    internal const string StaticParameters = "StaticParameters";
+    internal const string FreeParameters = "FreeParameters";
 
-    public const string Template = @"{
+    internal const string Template = @"{
       'Metadata': {
         'Algorithm':'',
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ParameterizedItemConverter.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ParameterizedItemConverter.cs	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ParameterizedItemConverter.cs	(revision 17330)
@@ -27,5 +27,5 @@
         JsonItem data = JsonItemConverter.Extract(param);
         data.Name = param.Name;
-        data.Path = param.Name;
+        data.Path = data.Name;
         data.PrependPath(item.Path);
         data.UpdatePaths();
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCGenerator.cs	(revision 17330)
@@ -15,10 +15,36 @@
     private JArray JsonItems { get; set; } = new JArray();
 
+    public string GenerateTemplate(IAlgorithm algorithm) {
+      JsonItems.Clear();
+      TypeList.Clear();
+
+      // 1.1. extract JsonItem, save the name in the metadata section of the 
+      // template and save it an JArray incl. all parameters of the JsonItem, 
+      // which have parameters aswell
+      AddInstantiableIItem(Constants.Algorithm, algorithm);
+      if (algorithm.Problem != null) // 1.2. only when an problem exists
+        AddInstantiableIItem(Constants.Problem, algorithm.Problem);
+
+      // 2. save the JArray with JsonItems (= IParameterizedItems)
+      template[Constants.Objects] = JsonItems;
+      // 3. save the types of the JsonItems (for instatiation)
+      template[Constants.Types] = JObject.FromObject(TypeList);
+      // 4. serialize template and return string
+      return CustomJsonWriter.Serialize(template);
+    }
+
+    #region Helper
+    private void AddInstantiableIItem(string metaDataTagName, IItem item) {
+      JsonItem jsonItem = JsonItemConverter.Extract(item);
+      template[Constants.Metadata][metaDataTagName] = item.ItemName;
+      PopulateJsonItems(jsonItem);
+    }
+
     private void PopulateJsonItems(JsonItem item) {
       if (item.Parameters != null) {
-        if(item.Range == null)
+        if (item.Range == null)
           JsonItems.Add(Serialize(item));
         foreach (var p in item.Parameters)
-          if(p.Parameters != null)
+          if (p.Parameters != null)
             PopulateJsonItems(p);
       }
@@ -31,5 +57,5 @@
 
       obj.Property(nameof(JsonItem.Parameters))?.Remove();
-      RefactorFreeParameters(obj, null);
+      RefactorFreeParameters(obj);
       RefactorStaticParameters(obj);
 
@@ -41,34 +67,9 @@
     }
 
-    public string GenerateTemplate(IAlgorithm algorithm, IProblem problem, params string[] freeParameters) {
-      JsonItems.Clear();
-      TypeList.Clear();
-
-      algorithm.Problem = problem;
-      JsonItem algorithmData = JsonItemConverter.Extract(algorithm);
-      JsonItem problemData = JsonItemConverter.Extract(problem);
-      PopulateJsonItems(algorithmData);
-      PopulateJsonItems(problemData);
-
-      template[Constants.Metadata][Constants.Algorithm] = algorithm.Name;
-      template[Constants.Metadata][Constants.Problem] = problem.Name;
-      template[Constants.Objects] = JsonItems;
-      template[Constants.Types] = JObject.FromObject(TypeList);
-
-      return CustomJsonWriter.Serialize(template);
-    }
-
-    #region Helper
-    private void RefactorFreeParameters(JToken token, string[] freeParameters) {
+    private void RefactorFreeParameters(JToken token) {
       IList<JObject> objToRemove = new List<JObject>();
       TransformNodes(x => {
         var p = x.ToObject<JsonItem>();
-
-        /*bool isSelected = false;
-        string name = x["Name"].ToObject<string>();
-        foreach (var selected in freeParameters)
-          isSelected = (name == selected || isSelected);
-        */
-        if (/*!isSelected ||*/ p.Default == null || (p.Default != null && p.Default.GetType() == typeof(string) && p.Range == null)) {
+        if (p.Default == null || (p.Default != null && p.Default.GetType() == typeof(string) && p.Range == null)) {
           objToRemove.Add(x);
         } else {
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCInstantiator.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCInstantiator.cs	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JCInstantiator.cs	(revision 17330)
@@ -23,9 +23,10 @@
     private IDictionary<string, JsonItem> ConfigurableItems { get; set; } = new Dictionary<string, JsonItem>();
     
-    public IAlgorithm Instantiate(string templateFile, string configFile) {
+    public IAlgorithm Instantiate(string templateFile, string configFile = "") {
 
       //1. Parse Template and Config files
       Template = JToken.Parse(File.ReadAllText(templateFile));
-      Config = JArray.Parse(File.ReadAllText(configFile));
+      if(!string.IsNullOrEmpty(configFile))
+        Config = JArray.Parse(File.ReadAllText(configFile));
       TypeList = Template[Constants.Types].ToObject<Dictionary<string, string>>();
       string algorithmName = Template[Constants.Metadata][Constants.Algorithm].ToString();
@@ -38,6 +39,7 @@
       SelectConfigurableItems();
 
-      //4. Merge Template and Config
-      MergeTemplateWithConfig();
+      //4. if config != null -> merge Template and Config 
+      if (Config != null)
+        MergeTemplateWithConfig();
 
       //5. resolve the references between parameterizedItems
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Plugin.cs.frame
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Plugin.cs.frame	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Plugin.cs.frame	(revision 17330)
@@ -20,10 +20,4 @@
 #endregion
 
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.IO;
-using System.Text;
-using System.Threading.Tasks;
 using HeuristicLab.PluginInfrastructure;
 
Index: /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Tests/HeuristicLab.JsonInterface/GeneratorInstantiatorTest.cs
===================================================================
--- /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Tests/HeuristicLab.JsonInterface/GeneratorInstantiatorTest.cs	(revision 17329)
+++ /branches/3026_IntegrationIntoSymSpace/HeuristicLab.Tests/HeuristicLab.JsonInterface/GeneratorInstantiatorTest.cs	(revision 17330)
@@ -19,8 +19,8 @@
     public void CreateTempFiles() {
       GeneticAlgorithm alg = new GeneticAlgorithm();
-      TravelingSalesmanProblem tsp = new TravelingSalesmanProblem();
+      alg.Problem = new TravelingSalesmanProblem();
       JCGenerator gen = new JCGenerator();
       //File.WriteAllText(@"C:\Workspace\Template.json", gen.GenerateTemplate(alg, tsp));
-      File.WriteAllText(templateFilePath, gen.GenerateTemplate(alg, tsp));
+      File.WriteAllText(templateFilePath, gen.GenerateTemplate(alg));
       File.WriteAllText(configFilePath, "["+
         "{\"Name\": \"Seed\",\"Default\": 55555,\"Path\": \"Genetic Algorithm (GA).Seed\"},"+
