diff --git a/kadmos/vistoms/templates/VISTOMS.html b/kadmos/vistoms/templates/VISTOMS.html
index de4254ed7d98399183f5e9578e2097172a60cc41..fd74668557f6e89cc9cf2bc73f9d245a79081486 100644
--- a/kadmos/vistoms/templates/VISTOMS.html
+++ b/kadmos/vistoms/templates/VISTOMS.html
@@ -18749,622 +18749,7 @@
 			//aigner: Here, the data is read and the XDSM is created
 			//#####################################################################//
 			function startXDSM(data, graphID) 
-			{	
-
-				//Highlight function, that shows usage of a node in the XDSM
-				function highlight(data,aText)
-				{
-                    console.log(data)
-                    console.log(aText)
-					aText = "/"+data.data.name+aText;
-					if (data.parent){highlight(data.parent,aText)}
-					else
-					{
-						scenarioKeys.forEach(function(k)
-						{
-							var xdsm_tmp;
-							xdsm_tmp = xdsms[k];
-							if (xdsm_tmp)
-							{
-								xdsm_tmp.svg.selectAll(".edge").each(function(p) 
-								{
-									var firstElement_tmp = p.name.split("/")[1]
-									var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
-									if (include(p.name,text_fromFirst))
-									{
-										var highlightEdge = d3.select(this).select("polygon");
-										highlightEdge
-											.style("stroke-width",5.)
-											.style("stroke","#CC0000")
-										d3.selectAll(".treeFrame")
-											.attr("fill-opacity", 0.5)
-											.attr("stroke-opacity", 0.5);
-										d3.selectAll(".nodeText").style("fill-opacity",0.5);
-									}
-								})
-							}
-						})
-					}
-				}
-				
-				//Unhighlight function again
-				function unhighlight(data,aText)
-				{
-					aText = "/"+data.data.name+aText;
-					if (data.parent){unhighlight(data.parent,aText)}
-					else
-					{
-						scenarioKeys.forEach(function(k)
-						{
-							var xdsm_tmp;
-							xdsm_tmp = xdsms[k];
-							if (xdsm_tmp)
-							{
-								xdsm_tmp.svg.selectAll(".edge").each(function(p) 
-								{
-									var firstElement_tmp = p.name.split("/")[1]
-									var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
-									if (include(p.name,text_fromFirst))
-									{
-										var highlightEdge = d3.select(this).select("polygon");
-										highlightEdge
-											.style("stroke-width",1.)
-											.style("stroke","black");
-										d3.selectAll(".treeFrame")
-											.attr("fill-opacity", 0.8)
-											.attr("stroke-opacity", 0.8);
-										d3.selectAll(".nodeText").style("fill-opacity",1);
-									}
-								})
-							}
-						})
-					}
-				}							
-				  
-				
-				function showVariableTable(aVariable)
-				{						
-					var headLine = "Node Information (" + aVariable.data.name + ")";
-					var data = [];
-					// render the table(s)
-					data.push({ "name" : "Name", "value" : "\""+aVariable.data.name+"\"" })
-					data.push({ "name" : "xPath", "value" : aVariable.data.xPath })
-					if (aVariable.data.type){data.push({ "name" : "Type", "value" : aVariable.data.type })}
-					if (aVariable.data.level){data.push({ "name" : "Level", "value" : aVariable.data.level })}
-					if (aVariable.data.children){data.push({ "name" : "Number of children", "value" : aVariable.data.children.length })}
-					if (aVariable.data.dimension){data.push({ "name" : "Dimension", "value" : aVariable.data.dimension })}
-					else if(aVariable.data.dimension===null){data.push({ "name" : "Dimension", "value" : "undefined" })}
-					if (aVariable.data.value){data.push({ "name" : "Value(s)", "value" : aVariable.data.value })}
-					
-					var d3_body = d3.select("body");
-					
-					var panel_div = d3_body.append("div").attr("class", "myPanel panel-default")
-					panel_div.append("div").attr("class","panel-heading")
-						.append("div").attr("class","panel_title").append("h4").text(headLine)
-					var listGroup = panel_div.append("div").attr("class","panel-body")
-						.append("table").attr("id","myTable")
-						.append("tbody")
-						
-					data.forEach(function(listElement)
-					{
-						var row = listGroup.append("tr")
-						row.append("td").text(listElement.name)
-						row.append("td").text(listElement.value)
-						
-					})
-					$('.myPanel').lobiPanel({
-						reload: false,
-						editTitle: false,
-						expand: false,
-						unpin: false,
-						resize: "none",
-						minWidth: 200,
-						minHeight: 200,
-						maxWidth: 1100,
-						maxHeight: 1200,
-					});
-					$('.myPanel').lobiPanel('unpin');
-				}
-				
-			   
-				function markVariable(aNode,variableData)
-				{
-					
-					function getFullXPath(data,aText)
-					{
-						aText = "/"+data.data.name+aText;
-						if (data.parent){return getFullXPath(data.parent,aText)}
-						else{return aText}
-					}
-					var path="";
-					var xPath = getFullXPath(aNode, path);
-					d3.select('.d3-context-menu').style('display', 'none');                                
-					
-					var bootboxContent = {title: 'Marking variable as ' + variableData.variableType, message: '<p>Please be patient...</p>'};
-					var xhr = $.ajax({
-						type: 'POST',
-						url: '/kadmosMarkVariable',
-							data: {
-							'graphID':graphID, 
-							'xPath':xPath, 
-							'variableType':variableData.variableType,
-							'upperBound':variableData.upperBound,
-							'lowerBound':variableData.lowerBound,
-							'nominalValue':variableData.nominalValue,
-							'operator':variableData.operator,
-							'currentOrder':nodeOrder
-						},
-						success: function(result)
-						{
-							if (result.includes("ERROR:"))
-							{
-								bootboxContent.message = result
-								kadmosErrorMessage(bootboxContent);
-							}
-							else
-							{
-								var updatedData = {};
-								updatedData = data;
-								var graphData = JSON.parse(result);             
-								for (var i = 0; i < updatedData.graphs.length; i++)
-								{
-									if (graphID == updatedData.graphs[i].id)
-									{
-										updatedData.graphs[i] = graphData.graphs[0];   
-									}
-								}
-																			
-								clearView();
-								makeKadmosMenu(updatedData);
-								xdsm_script(updatedData,graphID);
-								
-								bootboxContent.message = "Success!"
-								kadmosSuccessMessage(bootboxContent)
-							}
-						},
-						error: function(result)
-						{
-							bootboxContent.message = result
-							kadmosErrorMessage(bootboxContent);
-						}
-					});
-					kadmosHavePatience(xhr, bootboxContent)
-				}
-				
-				function unmarkVariable(aNode)
-				{
-					var firstFromSchema = currentGraph.variableSchemes["schema"].name
-					function getFullXPath(data,aText)
-					{
-						aText = "/"+data.data.name+aText;
-						if (data.parent){return getFullXPath(data.parent,aText)}
-						else{return aText}
-					}
-					var path="";
-					var xPath = getFullXPath(aNode, path);
-					var xPath_split = xPath.split(firstFromSchema)[1]
-					xPath = "/"+firstFromSchema+xPath_split;
-					
-					d3.select('.d3-context-menu').style('display', 'none');                                
-					
-					var bootboxContent = {title: 'Unmarking variable<p>Please be patient...</p>'};
-					var xhr = $.ajax({
-						type: 'POST',
-						url: '/kadmosUnmarkVariable',
-							data: {
-							'graphID':graphID, 
-							'xPath':xPath, 
-							'currentOrder':nodeOrder
-						},
-						success: function(result)
-						{
-							if (result.includes("ERROR:"))
-							{
-								bootboxContent.message = result
-								kadmosErrorMessage(bootboxContent);
-							}
-							else
-							{
-								var updatedData = {};
-								updatedData = data;
-								var graphData = JSON.parse(result);             
-								for (var i = 0; i < updatedData.graphs.length; i++)
-								{
-									if (graphID == updatedData.graphs[i].id)
-									{
-										updatedData.graphs[i] = graphData.graphs[0];   
-									}
-								}
-																			
-								clearView();
-								makeKadmosMenu(updatedData);
-								xdsm_script(updatedData,graphID);
-								
-								bootboxContent.message = "Success!"
-								kadmosSuccessMessage(bootboxContent)
-							}
-						},
-						error: function(result)
-						{
-							bootboxContent.message = result
-							kadmosErrorMessage(bootboxContent);
-						}
-					});
-					kadmosHavePatience(xhr, bootboxContent)
-				}
-				
-				//aigner: Marking variables as ... in KADMOS
-				var markingOptions = [
-					{  
-						title: 'design variable',
-						onMouseClick: function(elm, d, i) {
-							var theVariableData = {};
-							theVariableData.variableType = "designVariable";
-							theVariableData.operator = "";
-							theVariableData.upperBound = 0.;
-							theVariableData.lowerBound = 0.;
-							theVariableData.nominalValue = 0.;
-							
-							bootbox.hideAll();
-							bootbox.confirm({
-							title: 'Marking variable as ' + theVariableData.variableType,
-							message:"<form id='infos' action=''>"
-									+"\Nominal Value: <input type='text' id='nominalValue' name='nominalValue' /><br/>"
-									+"\Upper Bound:   <input type='text' id='upperBound' name='upperBound' /><br/>"
-									+"\Lower Bound:   <input type='text' id='lowerBound' name='lowerBound' />\</form>", 
-							callback: function(result){
-									if(result){
-										theVariableData.nominalValue = $('#nominalValue').submit()[0].value;
-										theVariableData.upperBound = $('#upperBound').submit()[0].value;
-										theVariableData.lowerBound = $('#lowerBound').submit()[0].value;
-										markVariable(elm.__data__, theVariableData);
-									}
-								}
-							});
-						},
-						onMouseOver: function(elm,d,i){}
-					},
-					{  
-						title: 'objective',
-						onMouseClick: function(elm, d, i) {
-							var theVariableData = {};
-							theVariableData.variableType = "objective";
-							theVariableData.operator = "";
-							theVariableData.upperBound = 0.;
-							theVariableData.lowerBound = 0.;
-							theVariableData.nominalValue = 0.;
-							markVariable(elm.__data__, theVariableData);
-						},
-						onMouseOver: function(elm,d,i){}
-					},
-					{  
-						title: 'constraint',
-						onMouseClick: function(elm, d, i) {
-							var theVariableData = {};
-							theVariableData.variableType = "constraint";
-							theVariableData.operator = "";
-							theVariableData.upperBound = 0.;
-							theVariableData.lowerBound = 0.;
-							theVariableData.nominalValue = 0.;
-							
-							bootbox.hideAll();
-							bootbox.confirm({
-							title: 'Marking variable as ' + theVariableData.variableType,
-							message:"<form id='infos' action=''>"
-									+"\Nominal Value: <input type='text' id='nominalValue' name='nominalValue' /><br/>"
-									+"\Mathematical operator (<, <=, = ,>=, >):   <input type='text' id='operator' name='operator' />\</form>", 
-							callback: function(result){
-									if(result){
-										theVariableData.nominalValue = $('#nominalValue').submit()[0].value;
-										theVariableData.operator = $('#operator').submit()[0].value;
-										markVariable(elm.__data__, theVariableData);
-									}
-								}
-							});
-						},
-						onMouseOver: function(elm,d,i){}
-					},
-					{  
-						title: 'quantity of interest',
-						onMouseClick: function(elm, d, i) {
-							var theVariableData = {};
-							theVariableData.variableType = "quantityOfInterest";
-							theVariableData.operator = "";
-							theVariableData.upperBound = 0.;
-							theVariableData.lowerBound = 0.;
-							theVariableData.nominalValue = 0.;
-							markVariable(elm.__data__, theVariableData);
-						},
-						onMouseOver: function(elm,d,i){}
-					},
-				];
-				
-			   
-				//menu --> functions for right click options
-				var nodeMenu = [
-				{
-					title: 'Show node information',
-					onMouseDown: function(elm, d, i) {
-						console.log(elm)
-						console.log(d)
-						showVariableTable(d);
-					},
-					onMouseUp: function(elm, d, i) {},
-					onMouseOver: function(elm, d, i) {},
-					childrenItems: []
-				},
-				{
-					title: 'Show usage of node in XDSM',
-					onMouseDown: function(elm, d, i) {
-						var theText="";
-						highlight(d,theText);
-					},
-					onMouseUp: function(elm, d, i) {
-						var theText="";
-						unhighlight(d,theText);
-					},
-					onMouseOver: function(elm, d, i) {
-					},
-					childrenItems: []
-				},
-				{
-					title: 'Copy x-path to clipboard',
-					onMouseDown: function(elm, d, i) {
-						function copyToClipboard(text) 
-						{
-							window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
-						}
-						function copyXPathToClipboard(data,aText)
-						{
-							aText = "/"+data.data.name+aText;
-							if (data.parent){copyXPathToClipboard(data.parent,aText)}
-							else{copyToClipboard(aText);}
-						}
-						var copyText="";
-						copyXPathToClipboard(d,copyText);
-						d3.select('.d3-context-menu').style('display', 'none');
-					},
-					onMouseUp: function(elm, d, i) {
-					},
-					onMouseOver: function(elm, d, i) {
-					},
-					childrenItems: []
-				},
-				{
-					title: 'Download full tree as XML-file',
-					onMouseDown: function(elm, d, i) {
-						//Begin xml structure with the first element
-						var xmlString = "<"+nodes[0].data.name+">"+"</"+nodes[0].data.name+">";
-						//Create a new xml document
-						var parser = new DOMParser();
-						var xmlDocument = parser.parseFromString(xmlString, "text/xml"); //important to use "text/xml"
-						//Get initial xPath of the tree and pass it to the function "writeTreeToXML"
-						var initialXPath = "/"+nodes[0].data.name;								
-						writeTreeToXML(nodes[0],xmlDocument,initialXPath);
-						//remove all attributes dummyID
-						removeAttributeInAllElements(xmlDocument,'dummyID');
-						//Make the xml document a string
-						var serializer = new XMLSerializer();
-						var xmlString = serializer.serializeToString(xmlDocument);
-						xmlString = vkbeautify.xml(xmlString);														
-						//Download a document with the xml-schema
-						download(aName+'_full.xml',xmlString);						
-					},
-					onMouseUp: function(elm, d, i) {
-					},
-					onMouseOver: function(elm, d, i) {
-					},
-					childrenItems: []
-				},
-				{
-					title: 'Download tree as XML-file from current node',
-					onMouseDown: function(elm, d, i) {
-						var xmlString = putAncestorsInXMLString({ val : '' }, d).val;
-						var initialXPath = putAncestorsInXPath({ val : '' }, d).val;												
-						//Create a new xml document
-						var parser = new DOMParser();
-						var xmlDocument = parser.parseFromString(xmlString, "text/xml"); //important to use "text/xml"
-						//Get initial xPath of the tree and pass it to the function "writeCurrentTreeToXML"
-						writeTreeToXML(d,xmlDocument,initialXPath);
-						//remove all attributes dummyID
-						removeAttributeInAllElements(xmlDocument,'dummyID');
-						//Make the xml document a string
-						var serializer = new XMLSerializer();
-						xmlString = serializer.serializeToString(xmlDocument);
-						xmlString = vkbeautify.xml(xmlString);														
-						//Download a document with the xml-schema
-						download(aName+"_"+d.data.name+'.xml',xmlString);						
-					},
-					onMouseUp: function(elm, d, i) {
-					},
-					onMouseOver: function(elm, d, i) {
-					},
-					childrenItems: []
-				},
-				{ 
-					title: 'Mark variable',
-					onMouseDown: function(elm, d, i) {},
-					onMouseUp: function(elm, d, i) {},
-					onMouseOver: function(elm, d, i) {},
-					childrenItems: markingOptions
-				},
-				{ 
-					title: 'Unmark variable',
-				   onMouseDown: function(elm, d, i) {
-						bootbox.hideAll();
-						bootbox.confirm("Are you sure you want to do this?", function(sure)
-						{
-							if (sure)
-							{unmarkVariable(elm.__data__)}
-						})
-					},
-					onMouseUp: function(elm, d, i) {},
-					onMouseOver: function(elm, d, i) {},
-					childrenItems: []
-				}
-				]
-				
-			   
-				
-				
-				//Function writeTreeToXML goes through tree nodes and puts the into an xml document
-				function writeTreeToXML(aNode,anXMLDoc,anXPath)
-				{
-					//Variable "children" 
-					//--> One children variable, no matter whether a node has "_children" (collapsed) or "children" (expanded)
-					var children;
-					if (aNode._children){children = aNode._children;}
-					else if (aNode.children){children = aNode.children;}
-					
-					//Get current xml element with its xPath
-					var element = anXMLDoc.evaluate(anXPath,anXMLDoc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;
-					if (element != null) {element.value = '...';}
-					
-					//If a node has children (collapsed or expanded), loop through them
-					if (children)
-					{
-						for (var i=0; i < children.length;i++)
-						{
-							//Name of the new XML element --> childName
-							var child = children[i];
-							var childName = child.data.name.split(/[\[\]]+/);//Split childName at "[]" which is the uID 
-							var cleanChildName = childName[0].split(/[\+\*\^\-\ \#]+/);//Split childName all special characters
-							var newNode = anXMLDoc.createElement(String(cleanChildName[0]));
-							
-							//The children are appended to the xPath --> newXPath
-							var newXPath = anXPath+"/"+cleanChildName[0];
-							
-							//If childName contains a uID, make the uID an attribute
-							if (childName[1])
-							{
-								if (parseInt(childName[1]))
-								{
-									var dummyID = childName[1];
-									newNode.setAttribute("dummyID", dummyID)
-									newXPath = newXPath+"[@dummyID='"+dummyID+"']";
-								}
-								else
-								{
-									var uID = childName[1];
-									newNode.setAttribute("uID", uID)
-									newXPath = newXPath+"[@uID='"+uID+"']";
-								}
-							}
-							if (cleanChildName.length>1) {newNode.setAttribute("elementName", childName[0])};
-							
-							//Append the newNode to the xml structure
-							element.appendChild(newNode);
-							
-							
-							
-							////aigner: Sorting of XML elements according to "uID"
-							// var items = element.children;
-							// var itemsArr = [];
-							// for (var j in items) {
-								// if (items[j].nodeType == 1) { // get rid of the whitespace text nodes
-									// itemsArr.push(items[j]);
-								// }
-							// }
-							// itemsArr.sort(function(a,b){
-								// if (a.getAttribute("uID") < b.getAttribute("uID"))
-									// return -1;
-								// if (a.getAttribute("uID") > b.getAttribute("uID"))
-									// return 1;
-								// return 0;
-								// });
-
-							// for (j = 0; j < itemsArr.length; ++j) {
-							  // element.appendChild(itemsArr[j]);
-							// }
-							
-							//call function writeTreeToXML recursively for all children
-							writeTreeToXML(child,anXMLDoc,newXPath)
-						}
-					}
-					else
-					{
-						if (aNode.data.value){element.innerHTML = String(aNode.data.value);}
-						else{element.innerHTML = " ";}
-					}
-					//return the xml document
-					return anXMLDoc;
-				}
-				
-				function removeAttributeInAllElements(aDocument,attribute)
-				{
-				  var matchingElements = [];
-				  var allElements = aDocument.getElementsByTagName('*');
-				  for (var i = 0, n = allElements.length; i < n; i++)
-				  {
-					if (allElements[i].getAttribute(attribute) !== null)
-					{
-						allElements[i].removeAttribute(attribute);
-					}
-				  }
-				  return matchingElements;
-				}
-				
-				function putAncestorsInXMLString(strWrapper, aNode)
-				{
-					//Name of the new XML element
-					var nodeName = aNode.data.name.split(/[\[\]]+/);//Split name at "[]" which is the uID 
-					var cleanNodeName = nodeName[0].split(/[\+\*\^\-\ \#]+/);//Split nodeName all special characters
-					//If nodeName contains a uID, make the uID an attribute
-					if (nodeName[1])
-					{
-						var uID = nodeName[1];
-						strWrapper.val = "<"+cleanNodeName[0]+" uID='"+ uID +"'>"+strWrapper.val+"</"+cleanNodeName[0]+">";;
-					}
-					else
-					{
-						strWrapper.val = "<"+cleanNodeName[0]+">"+strWrapper.val+"</"+cleanNodeName[0]+">";;
-					}
-					var aParent = aNode.parent;
-					if (aParent)
-					{
-						return putAncestorsInXMLString(strWrapper, aParent);
-					}
-					else 
-					{
-						return strWrapper;
-					}
-				}
-				
-				function putAncestorsInXPath(strWrapper, aNode)
-				{
-					//Name of the new XML element
-					var nodeName = aNode.data.name.split(/[\[\]]+/);//Split name at "[]" which is the uID 
-					var cleanNodeName = nodeName[0].split(/[\+\*\^\-\ \#]+/);//Split nodeName all special characters
-					//If nodeName contains a uID, make the uID an attribute
-					if (nodeName[1])
-					{
-						var uID = nodeName[1];
-						strWrapper.val = "/"+cleanNodeName[0]+"[@uID='"+uID+"']"+strWrapper.val;
-					}
-					else
-					{
-						strWrapper.val = "/"+cleanNodeName[0]+strWrapper.val;
-					}
-					var aParent = aNode.parent;
-					if (aParent)
-					{
-						return putAncestorsInXPath(strWrapper, aParent);
-					}
-					else 
-					{
-						return strWrapper;
-					}
-				}
-				
-				
-				
-				
-				
-				
-
-
-
-			
+			{				
 				var graphs, currentGraph, varCategories, entireData;
 				
 				entireData = data;
@@ -20022,43 +19407,15 @@
                                         else
                                         {   
                                             bootbox.hideAll();
-											var treeData = (JSON.parse(JSON.stringify(currentGraph.variableSchemes[varCategories[0].description])));
-											var firstEl = treeData[0].xPath.split("/")[1]		
-
-											var graphElements = JSON.parse(result)
+                                            var schema = currentGraph.variableSchemes[varCategories[0].description];
+                                            var treeData = (JSON.parse(JSON.stringify(schema)));				
+                                            
+                                            var graphElements = JSON.parse(result)
                                             var message = "";
-											
-											var variables = [];
-											var functions = [];
-											
-											if (result.includes("/"+firstEl))
+                                            
+                                            if (result.includes("/"+treeData.name))
                                             {
-												var pipeData = [];
-												//There are variables in the result
-												graphElements.forEach(function(graphElement)
-												{
-													if (graphElement.includes("/"+firstEl))
-													{ 
-														pipeData += ","+graphElement;
-													}
-													else
-													{
-														functions.push({name:graphElement,type:"function"})
-													}
-												})
-												variables = JSON.parse(JSON.stringify(treeData))
-												prune_tree(pipeData,variables)
-												
-                                                //aigner: HIER WEITER! evtl. treeData aufbauen (buildTree) um nodeMenu einfacher zu machen
-												variables.forEach(function(variable)
-												{
-													variable.name = variable.xPath
-													//work around because nodeMenu expexts the data, to have a "data" object inside
-                                                    variable.data = variable
-                                                    variable.data.name = variable.xPath.split("/")[variable.xPath.split("/").length-1]
-												})
-												
-												bootbox.prompt(
+                                                bootbox.prompt(
                                                 {
                                                     title: "The graph elements you requested contain variables. How do you want them displayed?",
                                                     inputType: 'checkbox',
@@ -20068,9 +19425,30 @@
                                                         if (result)
                                                         {
                                                             var message1 = "", message2 = "";
-                                                            var array
-                                                            bootbox.hideAll();
-                                                            if(result.includes("Tree View"))
+                                                        
+                                                            var array = ""
+                                                            var list = [];
+                                                            graphElements.forEach(function(graphElement)
+                                                            {
+                                                                if (graphElement.includes("/"+treeData.name))
+                                                                {
+                                                                    if (result.includes("Tree View"))
+                                                                    {
+                                                                        if (array == ""){array += graphElement}
+                                                                        else{array += "," + graphElement}
+                                                                    }
+                                                                    if (result.includes("List"))
+                                                                    {
+                                                                        list.push({name:graphElement,type:"variable"});
+                                                                    }
+                                                                }
+                                                                else
+                                                                {
+                                                                    list.push({name:graphElement,type:"function"});
+                                                                }
+                                                            })
+                                                            
+                                                            if(array!="")
                                                             {
                                                                 var headLine = "Tree Layout for category:\" " + category + "\", subcategory:\" " + sub_category + "\"";  
                                                                 var d3_body = d3.select("body");
@@ -20095,28 +19473,24 @@
                                                                 var treeLayoutSVG = treeLayoutdiv.append("svg").attr("class","treeLayoutSVG")
                                                                 var treeLayout = treeLayoutSVG.append("g").attr("class","treeLayout");
                                                                 maketreeLayout(array, treeLayout, treeLayoutSVG, treeLayoutdiv, divClassName, headLine, varCategories[0].description);
-                                                                show_bootBox_listMessage(functions,nodeMenu);
                                                             }
-															if (result.includes("List"))
-															{
-																show_bootBox_listMessage(variables,nodeMenu);
-																show_bootBox_listMessage(functions,nodeMenu);
-															}
+                                                            
+                                                            show_bootBox_listMessage(list);
                                                         }
                                                     }
                                                 })
-											}
+                                            }
                                             else
                                             {
-                                                var functions = [];
+                                                var list = [];
                                                 graphElements.forEach(function(graphElement)
                                                 {
-                                                   functions.push({name:graphElement,type:"function"})
+                                                   list.push({name:graphElement,type:"function"})
                                                 })
-                                                show_bootBox_listMessage(functions,toolMenu)
+                                                show_bootBox_listMessage(list)
                                             }
                                             
-                                            function show_bootBox_listMessage(aList,aMenu)
+                                            function show_bootBox_listMessage(aList)
                                             {
                                                 if (aList.length != 0)
                                                 {
@@ -20138,12 +19512,22 @@
                                                         .append("table").attr("id","myTable")
                                                         .append("tbody")
                                                         
-													var tr = listGroup
-														.selectAll('tr')
-														.data(aList).enter()
-															.append('tr')
-													var td = tr.append("td").html(function(d) { return d.xPath; })
-													tr.on('contextmenu', d3.contextMenu(aMenu));
+                                                    aList.forEach(function(listElement)
+                                                    {
+                                                        var td = listGroup.append("tr").append("td")
+                                                            .text(listElement.name)
+                                                            .on("mouseover",function(){
+                                                                d3.select(this).style("cursor", "pointer")
+                                                            })
+                                                        if (listElement.type=="variable")
+                                                        {
+                                                            td.on("mousedown",function(){bootbox.alert("I'm a variable!")})
+                                                        }
+                                                        else if (listElement.type=="function")
+                                                        {
+                                                            td.on("mousedown",function(){bootbox.alert("I'm a function!")})
+                                                        }
+                                                    })
                                                     $('.myPanel').lobiPanel({
                                                         reload: false,
                                                         editTitle: false,
@@ -22376,7 +21760,609 @@
                               return d.children || d._children ? "end" : "start";
                           })
                           //.text(function(d) { return d.data.text; });
-                 
+                          
+                        
+                        //Highlight function, that shows usage of a node in the XDSM
+                        function highlight(data,aText)
+                        {
+                            aText = "/"+data.data.name+aText;
+                            if (data.parent){highlight(data.parent,aText)}
+                            else
+                            {
+                                scenarioKeys.forEach(function(k)
+                                {
+                                    var xdsm_tmp;
+                                    xdsm_tmp = xdsms[k];
+                                    if (xdsm_tmp)
+                                    {
+                                        xdsm_tmp.svg.selectAll(".edge").each(function(p) 
+                                        {
+                                            var firstElement_tmp = p.name.split("/")[1]
+                                            var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
+                                            if (include(p.name,text_fromFirst))
+                                            {
+                                                var highlightEdge = d3.select(this).select("polygon");
+                                                highlightEdge
+                                                    .style("stroke-width",5.)
+                                                    .style("stroke","#CC0000")
+                                                d3.selectAll(".treeFrame")
+                                                    .attr("fill-opacity", 0.5)
+                                                    .attr("stroke-opacity", 0.5);
+                                                d3.selectAll(".nodeText").style("fill-opacity",0.5);
+                                            }
+                                        })
+                                    }
+                                })
+                            }
+                        }
+                        
+                        //Unhighlight function again
+                        function unhighlight(data,aText)
+                        {
+                            aText = "/"+data.data.name+aText;
+                            if (data.parent){unhighlight(data.parent,aText)}
+                            else
+                            {
+                                scenarioKeys.forEach(function(k)
+                                {
+                                    var xdsm_tmp;
+                                    xdsm_tmp = xdsms[k];
+                                    if (xdsm_tmp)
+                                    {
+                                        xdsm_tmp.svg.selectAll(".edge").each(function(p) 
+                                        {
+                                            var firstElement_tmp = p.name.split("/")[1]
+                                            var text_fromFirst = "/"+firstElement_tmp+aText.split(firstElement_tmp)[1]
+                                            if (include(p.name,text_fromFirst))
+                                            {
+                                                var highlightEdge = d3.select(this).select("polygon");
+                                                highlightEdge
+                                                    .style("stroke-width",1.)
+                                                    .style("stroke","black");
+                                                d3.selectAll(".treeFrame")
+                                                    .attr("fill-opacity", 0.8)
+                                                    .attr("stroke-opacity", 0.8);
+                                                d3.selectAll(".nodeText").style("fill-opacity",1);
+                                            }
+                                        })
+                                    }
+                                })
+                            }
+                        }							
+                          
+                        
+                        function showVariableTable(aVariable)
+                        {						
+                            var headLine = "Node Information (" + aVariable.data.name + ")";
+                            var data = [];
+                            // render the table(s)
+                            data.push({ "name" : "Name", "value" : "\""+aVariable.data.name+"\"" })
+                            data.push({ "name" : "xPath", "value" : aVariable.data.xPath })
+                            if (aVariable.data.type){data.push({ "name" : "Type", "value" : aVariable.data.type })}
+                            if (aVariable.data.level){data.push({ "name" : "Level", "value" : aVariable.data.level })}
+                            if (aVariable.data.children){data.push({ "name" : "Number of children", "value" : aVariable.data.children.length })}
+                            if (aVariable.data.dimension){data.push({ "name" : "Dimension", "value" : aVariable.data.dimension })}
+                            else if(aVariable.data.dimension===null){data.push({ "name" : "Dimension", "value" : "undefined" })}
+                            if (aVariable.data.value){data.push({ "name" : "Value(s)", "value" : aVariable.data.value })}
+                            
+                            var d3_body = d3.select("body");
+                            
+                            var panel_div = d3_body.append("div").attr("class", "myPanel panel-default")
+                            panel_div.append("div").attr("class","panel-heading")
+                                .append("div").attr("class","panel_title").append("h4").text(headLine)
+                            var listGroup = panel_div.append("div").attr("class","panel-body")
+                                .append("table").attr("id","myTable")
+                                .append("tbody")
+                                
+                            data.forEach(function(listElement)
+                            {
+                                var row = listGroup.append("tr")
+                                row.append("td").text(listElement.name)
+                                row.append("td").text(listElement.value)
+                                
+                            })
+                            $('.myPanel').lobiPanel({
+                                reload: false,
+                                editTitle: false,
+                                expand: false,
+                                unpin: false,
+                                resize: "none",
+                                minWidth: 200,
+                                minHeight: 200,
+                                maxWidth: 1100,
+                                maxHeight: 1200,
+                            });
+                            $('.myPanel').lobiPanel('unpin');
+                        }
+                        
+                       
+                        function markVariable(aNode,variableData)
+                        {
+                            
+                            function getFullXPath(data,aText)
+                            {
+                                aText = "/"+data.data.name+aText;
+                                if (data.parent){return getFullXPath(data.parent,aText)}
+                                else{return aText}
+                            }
+                            var path="";
+                            var xPath = getFullXPath(aNode, path);
+                            d3.select('.d3-context-menu').style('display', 'none');                                
+                            
+                            var bootboxContent = {title: 'Marking variable as ' + variableData.variableType, message: '<p>Please be patient...</p>'};
+                            var xhr = $.ajax({
+                                type: 'POST',
+                                url: '/kadmosMarkVariable',
+                                    data: {
+                                    'graphID':graphID, 
+                                    'xPath':xPath, 
+                                    'variableType':variableData.variableType,
+                                    'upperBound':variableData.upperBound,
+                                    'lowerBound':variableData.lowerBound,
+                                    'nominalValue':variableData.nominalValue,
+                                    'operator':variableData.operator,
+                                    'currentOrder':nodeOrder
+                                },
+                                success: function(result)
+                                {
+                                    if (result.includes("ERROR:"))
+                                    {
+                                        bootboxContent.message = result
+                                        kadmosErrorMessage(bootboxContent);
+                                    }
+                                    else
+                                    {
+                                        var updatedData = {};
+                                        updatedData = data;
+                                        var graphData = JSON.parse(result);             
+                                        for (var i = 0; i < updatedData.graphs.length; i++)
+                                        {
+                                            if (graphID == updatedData.graphs[i].id)
+                                            {
+                                                updatedData.graphs[i] = graphData.graphs[0];   
+                                            }
+                                        }
+                                                                                    
+                                        clearView();
+                                        makeKadmosMenu(updatedData);
+                                        xdsm_script(updatedData,graphID);
+                                        
+                                        bootboxContent.message = "Success!"
+                                        kadmosSuccessMessage(bootboxContent)
+                                    }
+                                },
+                                error: function(result)
+                                {
+                                    bootboxContent.message = result
+                                    kadmosErrorMessage(bootboxContent);
+                                }
+                            });
+                            kadmosHavePatience(xhr, bootboxContent)
+                        }
+                        
+                        function unmarkVariable(aNode)
+                        {
+                            var firstFromSchema = currentGraph.variableSchemes["schema"].name
+                            function getFullXPath(data,aText)
+                            {
+                                aText = "/"+data.data.name+aText;
+                                if (data.parent){return getFullXPath(data.parent,aText)}
+                                else{return aText}
+                            }
+                            var path="";
+                            var xPath = getFullXPath(aNode, path);
+                            var xPath_split = xPath.split(firstFromSchema)[1]
+                            xPath = "/"+firstFromSchema+xPath_split;
+                            
+                            d3.select('.d3-context-menu').style('display', 'none');                                
+                            
+                            var bootboxContent = {title: 'Unmarking variable<p>Please be patient...</p>'};
+                            var xhr = $.ajax({
+                                type: 'POST',
+                                url: '/kadmosUnmarkVariable',
+                                    data: {
+                                    'graphID':graphID, 
+                                    'xPath':xPath, 
+                                    'currentOrder':nodeOrder
+                                },
+                                success: function(result)
+                                {
+                                    if (result.includes("ERROR:"))
+                                    {
+                                        bootboxContent.message = result
+                                        kadmosErrorMessage(bootboxContent);
+                                    }
+                                    else
+                                    {
+                                        var updatedData = {};
+                                        updatedData = data;
+                                        var graphData = JSON.parse(result);             
+                                        for (var i = 0; i < updatedData.graphs.length; i++)
+                                        {
+                                            if (graphID == updatedData.graphs[i].id)
+                                            {
+                                                updatedData.graphs[i] = graphData.graphs[0];   
+                                            }
+                                        }
+                                                                                    
+                                        clearView();
+                                        makeKadmosMenu(updatedData);
+                                        xdsm_script(updatedData,graphID);
+                                        
+                                        bootboxContent.message = "Success!"
+                                        kadmosSuccessMessage(bootboxContent)
+                                    }
+                                },
+                                error: function(result)
+                                {
+                                    bootboxContent.message = result
+                                    kadmosErrorMessage(bootboxContent);
+                                }
+                            });
+                            kadmosHavePatience(xhr, bootboxContent)
+                        }
+                        
+                        //aigner: Marking variables as ... in KADMOS
+                        var markingOptions = [
+                            {  
+                                title: 'design variable',
+                                onMouseClick: function(elm, d, i) {
+                                    var theVariableData = {};
+                                    theVariableData.variableType = "designVariable";
+                                    theVariableData.operator = "";
+                                    theVariableData.upperBound = 0.;
+                                    theVariableData.lowerBound = 0.;
+                                    theVariableData.nominalValue = 0.;
+                                    
+                                    bootbox.hideAll();
+                                    bootbox.confirm({
+                                    title: 'Marking variable as ' + theVariableData.variableType,
+                                    message:"<form id='infos' action=''>"
+                                            +"\Nominal Value: <input type='text' id='nominalValue' name='nominalValue' /><br/>"
+                                            +"\Upper Bound:   <input type='text' id='upperBound' name='upperBound' /><br/>"
+                                            +"\Lower Bound:   <input type='text' id='lowerBound' name='lowerBound' />\</form>", 
+                                    callback: function(result){
+                                            if(result){
+                                                theVariableData.nominalValue = $('#nominalValue').submit()[0].value;
+                                                theVariableData.upperBound = $('#upperBound').submit()[0].value;
+                                                theVariableData.lowerBound = $('#lowerBound').submit()[0].value;
+                                                markVariable(elm.__data__, theVariableData);
+                                            }
+                                        }
+                                    });
+                                },
+                                onMouseOver: function(elm,d,i){}
+                            },
+                            {  
+                                title: 'objective',
+                                onMouseClick: function(elm, d, i) {
+                                    var theVariableData = {};
+                                    theVariableData.variableType = "objective";
+                                    theVariableData.operator = "";
+                                    theVariableData.upperBound = 0.;
+                                    theVariableData.lowerBound = 0.;
+                                    theVariableData.nominalValue = 0.;
+                                    markVariable(elm.__data__, theVariableData);
+                                },
+                                onMouseOver: function(elm,d,i){}
+                            },
+                            {  
+                                title: 'constraint',
+                                onMouseClick: function(elm, d, i) {
+                                    var theVariableData = {};
+                                    theVariableData.variableType = "constraint";
+                                    theVariableData.operator = "";
+                                    theVariableData.upperBound = 0.;
+                                    theVariableData.lowerBound = 0.;
+                                    theVariableData.nominalValue = 0.;
+                                    
+                                    bootbox.hideAll();
+                                    bootbox.confirm({
+                                    title: 'Marking variable as ' + theVariableData.variableType,
+                                    message:"<form id='infos' action=''>"
+                                            +"\Nominal Value: <input type='text' id='nominalValue' name='nominalValue' /><br/>"
+                                            +"\Mathematical operator (<, <=, = ,>=, >):   <input type='text' id='operator' name='operator' />\</form>", 
+                                    callback: function(result){
+                                            if(result){
+                                                theVariableData.nominalValue = $('#nominalValue').submit()[0].value;
+                                                theVariableData.operator = $('#operator').submit()[0].value;
+                                                markVariable(elm.__data__, theVariableData);
+                                            }
+                                        }
+                                    });
+                                },
+                                onMouseOver: function(elm,d,i){}
+                            },
+                            {  
+                                title: 'quantity of interest',
+                                onMouseClick: function(elm, d, i) {
+                                    var theVariableData = {};
+                                    theVariableData.variableType = "quantityOfInterest";
+                                    theVariableData.operator = "";
+                                    theVariableData.upperBound = 0.;
+                                    theVariableData.lowerBound = 0.;
+                                    theVariableData.nominalValue = 0.;
+                                    markVariable(elm.__data__, theVariableData);
+                                },
+                                onMouseOver: function(elm,d,i){}
+                            },
+                        ];
+                        
+                       
+                        //menu --> functions for right click options
+                        var nodeMenu = [
+                        {
+                            title: 'Show node information',
+                            onMouseDown: function(elm, d, i) {
+                                showVariableTable(d);
+                            },
+                            onMouseUp: function(elm, d, i) {},
+                            onMouseOver: function(elm, d, i) {},
+                            childrenItems: []
+                        },
+                        {
+                            title: 'Show usage of node in XDSM',
+                            onMouseDown: function(elm, d, i) {
+                                var theText="";
+                                highlight(d,theText);
+                            },
+                            onMouseUp: function(elm, d, i) {
+                                var theText="";
+                                unhighlight(d,theText);
+                            },
+                            onMouseOver: function(elm, d, i) {
+                            },
+                            childrenItems: []
+                        },
+                        {
+                            title: 'Copy x-path to clipboard',
+                            onMouseDown: function(elm, d, i) {
+                                function copyToClipboard(text) 
+                                {
+                                    window.prompt("Copy to clipboard: Ctrl+C, Enter", text);
+                                }
+                                function copyXPathToClipboard(data,aText)
+                                {
+                                    aText = "/"+data.data.name+aText;
+                                    if (data.parent){copyXPathToClipboard(data.parent,aText)}
+                                    else{copyToClipboard(aText);}
+                                }
+                                var copyText="";
+                                copyXPathToClipboard(d,copyText);
+                                d3.select('.d3-context-menu').style('display', 'none');
+                            },
+                            onMouseUp: function(elm, d, i) {
+                            },
+                            onMouseOver: function(elm, d, i) {
+                            },
+                            childrenItems: []
+                        },
+                        {
+                            title: 'Download full tree as XML-file',
+                            onMouseDown: function(elm, d, i) {
+                                //Begin xml structure with the first element
+                                var xmlString = "<"+nodes[0].data.name+">"+"</"+nodes[0].data.name+">";
+                                //Create a new xml document
+                                var parser = new DOMParser();
+                                var xmlDocument = parser.parseFromString(xmlString, "text/xml"); //important to use "text/xml"
+                                //Get initial xPath of the tree and pass it to the function "writeTreeToXML"
+                                var initialXPath = "/"+nodes[0].data.name;								
+                                writeTreeToXML(nodes[0],xmlDocument,initialXPath);
+                                //remove all attributes dummyID
+                                removeAttributeInAllElements(xmlDocument,'dummyID');
+                                //Make the xml document a string
+                                var serializer = new XMLSerializer();
+                                var xmlString = serializer.serializeToString(xmlDocument);
+                                xmlString = vkbeautify.xml(xmlString);														
+                                //Download a document with the xml-schema
+                                download(aName+'_full.xml',xmlString);						
+                            },
+                            onMouseUp: function(elm, d, i) {
+                            },
+                            onMouseOver: function(elm, d, i) {
+                            },
+                            childrenItems: []
+                        },
+                        {
+                            title: 'Download tree as XML-file from current node',
+                            onMouseDown: function(elm, d, i) {
+                                var xmlString = putAncestorsInXMLString({ val : '' }, d).val;
+                                var initialXPath = putAncestorsInXPath({ val : '' }, d).val;												
+                                //Create a new xml document
+                                var parser = new DOMParser();
+                                var xmlDocument = parser.parseFromString(xmlString, "text/xml"); //important to use "text/xml"
+                                //Get initial xPath of the tree and pass it to the function "writeCurrentTreeToXML"
+                                writeTreeToXML(d,xmlDocument,initialXPath);
+                                //remove all attributes dummyID
+                                removeAttributeInAllElements(xmlDocument,'dummyID');
+                                //Make the xml document a string
+                                var serializer = new XMLSerializer();
+                                xmlString = serializer.serializeToString(xmlDocument);
+                                xmlString = vkbeautify.xml(xmlString);														
+                                //Download a document with the xml-schema
+                                download(aName+"_"+d.data.name+'.xml',xmlString);						
+                            },
+                            onMouseUp: function(elm, d, i) {
+                            },
+                            onMouseOver: function(elm, d, i) {
+                            },
+                            childrenItems: []
+                        },
+                        { 
+                            title: 'Mark variable',
+                            onMouseDown: function(elm, d, i) {},
+                            onMouseUp: function(elm, d, i) {},
+                            onMouseOver: function(elm, d, i) {},
+                            childrenItems: markingOptions
+                        },
+                        { 
+                            title: 'Unmark variable',
+                           onMouseDown: function(elm, d, i) {
+                                bootbox.hideAll();
+                                bootbox.confirm("Are you sure you want to do this?", function(sure)
+                                {
+                                    if (sure)
+                                    {unmarkVariable(elm.__data__)}
+                                })
+                            },
+                            onMouseUp: function(elm, d, i) {},
+                            onMouseOver: function(elm, d, i) {},
+                            childrenItems: []
+                        }
+                        ]
+                        
+                       
+                        
+                        
+                        //Function writeTreeToXML goes through tree nodes and puts the into an xml document
+                        function writeTreeToXML(aNode,anXMLDoc,anXPath)
+                        {
+                            //Variable "children" 
+                            //--> One children variable, no matter whether a node has "_children" (collapsed) or "children" (expanded)
+                            var children;
+                            if (aNode._children){children = aNode._children;}
+                            else if (aNode.children){children = aNode.children;}
+                            
+                            //Get current xml element with its xPath
+                            var element = anXMLDoc.evaluate(anXPath,anXMLDoc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;
+                            if (element != null) {element.value = '...';}
+                            
+                            //If a node has children (collapsed or expanded), loop through them
+                            if (children)
+                            {
+                                for (var i=0; i < children.length;i++)
+                                {
+                                    //Name of the new XML element --> childName
+                                    var child = children[i];
+                                    var childName = child.data.name.split(/[\[\]]+/);//Split childName at "[]" which is the uID 
+                                    var cleanChildName = childName[0].split(/[\+\*\^\-\ \#]+/);//Split childName all special characters
+                                    var newNode = anXMLDoc.createElement(String(cleanChildName[0]));
+                                    
+                                    //The children are appended to the xPath --> newXPath
+                                    var newXPath = anXPath+"/"+cleanChildName[0];
+                                    
+                                    //If childName contains a uID, make the uID an attribute
+                                    if (childName[1])
+                                    {
+                                        if (parseInt(childName[1]))
+                                        {
+                                            var dummyID = childName[1];
+                                            newNode.setAttribute("dummyID", dummyID)
+                                            newXPath = newXPath+"[@dummyID='"+dummyID+"']";
+                                        }
+                                        else
+                                        {
+                                            var uID = childName[1];
+                                            newNode.setAttribute("uID", uID)
+                                            newXPath = newXPath+"[@uID='"+uID+"']";
+                                        }
+                                    }
+                                    if (cleanChildName.length>1) {newNode.setAttribute("elementName", childName[0])};
+                                    
+                                    //Append the newNode to the xml structure
+                                    element.appendChild(newNode);
+                                    
+                                    
+                                    
+                                    ////aigner: Sorting of XML elements according to "uID"
+                                    // var items = element.children;
+                                    // var itemsArr = [];
+                                    // for (var j in items) {
+                                        // if (items[j].nodeType == 1) { // get rid of the whitespace text nodes
+                                            // itemsArr.push(items[j]);
+                                        // }
+                                    // }
+                                    // itemsArr.sort(function(a,b){
+                                        // if (a.getAttribute("uID") < b.getAttribute("uID"))
+                                            // return -1;
+                                        // if (a.getAttribute("uID") > b.getAttribute("uID"))
+                                            // return 1;
+                                        // return 0;
+                                        // });
+
+                                    // for (j = 0; j < itemsArr.length; ++j) {
+                                      // element.appendChild(itemsArr[j]);
+                                    // }
+                                    
+                                    //call function writeTreeToXML recursively for all children
+                                    writeTreeToXML(child,anXMLDoc,newXPath)
+                                }
+                            }
+                            else
+                            {
+                                if (aNode.data.value){element.innerHTML = String(aNode.data.value);}
+                                else{element.innerHTML = " ";}
+                            }
+                            //return the xml document
+                            return anXMLDoc;
+                        }
+                        
+                        function removeAttributeInAllElements(aDocument,attribute)
+                        {
+                          var matchingElements = [];
+                          var allElements = aDocument.getElementsByTagName('*');
+                          for (var i = 0, n = allElements.length; i < n; i++)
+                          {
+                            if (allElements[i].getAttribute(attribute) !== null)
+                            {
+                                allElements[i].removeAttribute(attribute);
+                            }
+                          }
+                          return matchingElements;
+                        }
+                        
+                        function putAncestorsInXMLString(strWrapper, aNode)
+                        {
+                            //Name of the new XML element
+                            var nodeName = aNode.data.name.split(/[\[\]]+/);//Split name at "[]" which is the uID 
+                            var cleanNodeName = nodeName[0].split(/[\+\*\^\-\ \#]+/);//Split nodeName all special characters
+                            //If nodeName contains a uID, make the uID an attribute
+                            if (nodeName[1])
+                            {
+                                var uID = nodeName[1];
+                                strWrapper.val = "<"+cleanNodeName[0]+" uID='"+ uID +"'>"+strWrapper.val+"</"+cleanNodeName[0]+">";;
+                            }
+                            else
+                            {
+                                strWrapper.val = "<"+cleanNodeName[0]+">"+strWrapper.val+"</"+cleanNodeName[0]+">";;
+                            }
+                            var aParent = aNode.parent;
+                            if (aParent)
+                            {
+                                return putAncestorsInXMLString(strWrapper, aParent);
+                            }
+                            else 
+                            {
+                                return strWrapper;
+                            }
+                        }
+                        
+                        function putAncestorsInXPath(strWrapper, aNode)
+                        {
+                            //Name of the new XML element
+                            var nodeName = aNode.data.name.split(/[\[\]]+/);//Split name at "[]" which is the uID 
+                            var cleanNodeName = nodeName[0].split(/[\+\*\^\-\ \#]+/);//Split nodeName all special characters
+                            //If nodeName contains a uID, make the uID an attribute
+                            if (nodeName[1])
+                            {
+                                var uID = nodeName[1];
+                                strWrapper.val = "/"+cleanNodeName[0]+"[@uID='"+uID+"']"+strWrapper.val;
+                            }
+                            else
+                            {
+                                strWrapper.val = "/"+cleanNodeName[0]+strWrapper.val;
+                            }
+                            var aParent = aNode.parent;
+                            if (aParent)
+                            {
+                                return putAncestorsInXPath(strWrapper, aParent);
+                            }
+                            else 
+                            {
+                                return strWrapper;
+                            }
+                        }
+                          
                         nodeEnter = nodeEnter
                         .on('contextmenu', d3.contextMenu(nodeMenu));                          
                         
@@ -22470,7 +22456,7 @@
 			}
 			startXDSM(data,graphID);
 
-			////aigner: Unused functions --> Could be helpful at some point
+			////aigner: Unused funcktions --> Could be helpful at some point
 			////aigner: clone function, so that original object is not overwritten but deep copied
 			// function clone(obj) {
 				// if (null == obj || "object" != typeof obj) return obj;
@@ -25875,7 +25861,7 @@
 						{
 							if (theLink.to == theNode.id)
 							{
-								array = array + ", " + theLink.name;
+								array = array + "," + theLink.name;
 							}
 							name_tmp = "Input tree view:" + theNode.id + "; Categorization: " + categoryDescr;
 						}
@@ -25883,7 +25869,7 @@
 						{
 							if (theLink.from == theNode.id)
 							{
-								array = array + ", " + theLink.name;
+								array = array + "," + theLink.name;
 							}
 							name_tmp = "Output tree view:" + theNode.id + "; Categorization: " + categoryDescr;
 						}