Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/Executer.cs
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/Executer.cs	(revision 1116)
+++ branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/Executer.cs	(revision 1130)
@@ -103,28 +103,23 @@
 
     private void StoreResults(Execution finishedExecution, ProcessingEngine finishedEngine) {
-      Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-      store.Add(new Statement(modelEntity, Ontology.PredicateInstanceOf, Ontology.TypeGeneticProgrammingFunctionTree));
-      store.Add(new Statement(finishedExecution.DataSetEntity, Ontology.PredicateHasModel, modelEntity));
-      StoreModelAttribute(modelEntity, "TargetVariable", finishedExecution.TargetVariable);
+      Entity model = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      store.Add(new Statement(model, Ontology.PredicateInstanceOf, Ontology.TypeGeneticProgrammingFunctionTree));
+      store.Add(new Statement(finishedExecution.DataSetEntity, Ontology.PredicateHasModel, model));
+      StoreModelAttribute(model, Ontology.TargetVariable, finishedExecution.TargetVariable);
       Scope bestModelScope = finishedEngine.GlobalScope.GetVariableValue<Scope>("BestValidationSolution", false);
-      StoreModelAttribute(modelEntity, "TrainingMeanSquaredError", bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data);
-      StoreModelAttribute(modelEntity, "ValidationMeanSquaredError", bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data);
-      StoreModelAttribute(modelEntity, "TrainingMeanAbsolutePercentageError", bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data);
-      StoreModelAttribute(modelEntity, "ValidationMeanAbsolutePercentageError", bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data);
-      StoreModelAttribute(modelEntity, "TreeSize", bestModelScope.GetVariableValue<IntData>("TreeSize", false).Data);
-      StoreModelAttribute(modelEntity, "TreeHeight", bestModelScope.GetVariableValue<IntData>("TreeHeight", false).Data);
-      StoreModelAttribute(modelEntity, "EvaluatedSolutions", bestModelScope.GetVariableValue<IntData>("EvaluatedSolutions", false).Data);
+      StoreModelAttribute(model, Ontology.TrainingMeanSquaredError, bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data);
+      StoreModelAttribute(model, Ontology.ValidationMeanSquaredError, bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data);
+      StoreModelAttribute(model, Ontology.TrainingMeanAbsolutePercentageError, bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data);
+      StoreModelAttribute(model, Ontology.ValidationMeanAbsolutePercentageError, bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data);
+      StoreModelAttribute(model, Ontology.TreeSize, bestModelScope.GetVariableValue<IntData>("TreeSize", false).Data);
+      StoreModelAttribute(model, Ontology.TreeHeight, bestModelScope.GetVariableValue<IntData>("TreeHeight", false).Data);
+      StoreModelAttribute(model, Ontology.EvaluatedSolutions, bestModelScope.GetVariableValue<IntData>("EvaluatedSolutions", false).Data);
        
       byte[] serializedModel = PersistenceManager.SaveToGZip(bestModelScope.GetVariableValue("FunctionTree", false));
-      store.Add(new Statement(modelEntity, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));
+      store.Add(new Statement(model, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));
+   }
 
-    }
-
-    private void StoreModelAttribute(Entity model, string name, object value) {
-      Entity attr = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-      store.Add(new Statement(model, Ontology.PredicateModelAttribute, attr));
-      store.Add(new Statement(attr, Ontology.PredicateModelAttributeName, new Literal(name)));
-      store.Add(new Statement(attr, Ontology.PredicateModelAttributeValue, new Literal(value)));
-      store.Add(new Statement(attr, Ontology.PredicateModelAttributeType, Ontology.TypeOrdinalAttribute));
+    private void StoreModelAttribute(Entity model, Entity predicate, object value) {
+      store.Add(new Statement(model, predicate, new Literal(value)));
     }
   }
