diff --git a/public/kwic-4.0.css b/public/kwic-4.0.css
index 64f1232..84a32aa 100644
--- a/public/kwic-4.0.css
+++ b/public/kwic-4.0.css
@@ -1,5 +1,4 @@
 @charset "utf-8";
-
 /*
   light orange: #f4eebb;
   dark orange: #ffa500;
@@ -43,18 +42,18 @@
   background-color: #ddd;
 }
 
-ol > li > div.snippet > span,
-ol > li > div.snippet > span > span {
+ol > li > div > div.snippet > span,
+ol > li > div > div.snippet > span > span {
   white-space: no-wrap !important;
 }
 
-ol.free-aligned > li:not(.active) > div.snippet > span.left {
+ol.free-aligned > li:not(.active) > div > div.snippet > span.left {
   display: inline-block;
   text-align: right;
   width: 50.046%;
 }
 
-ol.free-aligned > li:not(.active) > div.snippet > span.separator {
+ol.free-aligned > li:not(.active) > div > div.snippet > span.separator {
   width: 0px;
   height: 1em;
   margin-bottom: -2px;
@@ -65,11 +64,11 @@
   margin-right: 2px;
 }
 
-ol.free-aligned > li > div.snippet > span.right {
+ol.free-aligned > li > div > div.snippet > span.right {
   text-align: left;
 }
 
-ol.left-aligned > li > div.snippet > span.context-left {
+ol.left-aligned > li > div > div.snippet > span.context-left {
   display: inline-block;
   text-align: right;
   width: 50.01%;
@@ -79,13 +78,13 @@
   text-align: right;
 }
 
-ol.right-aligned > li:not(.active) > div.snippet > span.context-right {
+ol.right-aligned > li:not(.active) > div > div.snippet > span.context-right {
   display: inline-block;
   text-align: left;
   width: 49.915%;
 }
 
-li > div.snippet > span {
+li > div > div.snippet > span {
   color: #666;
 }
 
@@ -132,21 +131,23 @@
   border-width: 2px;
   background-color: #f4eebb;
   position: relative;
-  min-height: 68pt;
 }
 
-ol > li.active > div.snippet {
+ol > li.active > div > div.snippet {
   margin: 5pt 10pt;
   margin-right: 3em;
-  margin-bottom: 24pt;
 }
 
-ol > li.active > div.snippet > span {
+ol > li.active > div {
+  min-height: 42pt;
+}
+
+ol > li.active > div > div.snippet > span {
   line-height: 1.4em;
   width: auto;
 }
 
-ol > li.active > div.snippet > span.context-left {
+ol > li.active > div > div.snippet > span.context-left {
   margin-left: 0;
   display: inline;
   overflow: visible;
@@ -213,8 +214,8 @@
   color: white;
   text-shadow: none;
   padding: 3pt 10pt;
-  margin: 5pt 0pt 0pt 0pt;
-  position: absolute;
+  margin: 0pt;
   width: 100%;
   bottom: 0;
+  z-index: 300;
 }
\ No newline at end of file
diff --git a/public/style.css b/public/style.css
index 0ad372e..537c72f 100644
--- a/public/style.css
+++ b/public/style.css
@@ -1,4 +1,5 @@
 @charset "utf-8";
+
 body, html {
   color: #666;
   font-family: verdana, tahoma, arial;
@@ -8,8 +9,11 @@
 
 #top {
   background-color: #7ba400;
+  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
+  box-sizing: border-box;         /* Opera/IE 8+ */
   padding: 0pt;
-  padding-top: 10px;
+  padding-top: 5px;
   position: relative;
   height: 70px;
   padding-left: 30px;
@@ -29,7 +33,7 @@
 
 form {
   margin-left: 235px;
-  margin-top:10px
+  margin-top:0px
 }
 
 form input[type=search] {
@@ -259,7 +263,7 @@
     background-image: url('/img/korap-logo-solo.svg');
     position: absolute;
     width: 260px; /* like sidebars*/
-    height: 80px; /* like #top */
+    height: 68px; /* like #top */
     z-index: 999;
     background-repeat: no-repeat;
     background-position: center center;
@@ -268,4 +272,4 @@
 
 h1 span {
     margin-left: -3000px;
-}
\ No newline at end of file
+}
diff --git a/public/table.css b/public/table.css
new file mode 100644
index 0000000..4a4ac27
--- /dev/null
+++ b/public/table.css
@@ -0,0 +1,77 @@
+@charset "utf-8";
+
+ol > li:not(.active) .tokenInfo {
+  display: none;
+}
+
+.tokenInfo {
+  display: none;
+}
+
+.tokenInfo.active {
+  display: block;
+}
+
+.tokenInfo {
+  background-color: #ffa500;
+  margin-right: 26px;
+  overflow: auto;
+}
+
+.tokenInfo table {
+  font-size: 10pt;
+  padding: 3pt 10pt; /* wie in ol > li.active p */
+}
+
+.tokenInfo table tr {
+}
+
+/* All cells */
+.tokenInfo table tr > * {
+  padding: 1pt 6pt;
+  vertical-align: top;
+}
+
+.tokenInfo table tr td {
+  text-align: center;
+  background-color: #f4eebb;
+}
+
+/* header */
+.tokenInfo table tr th:not([rowspan]) {
+  color: white;
+  text-shadow: none;
+}
+
+.tokenInfo table tr:first-child th {
+  text-align: center;
+  background-color: #ff8000;
+}
+
+/* first column header */
+.tokenInfo table tr:first-child th:first-child {
+  position: relative;
+  padding-right: 20pt;
+  padding-left: 5pt;
+}
+
+/* second column header */
+.tokenInfo table tr:first-child th:nth-child(2) {
+  text-align: left;
+  padding-left: 20pt;
+  padding-right: 5pt;
+}
+
+.tokenInfo th[rowspan]:first-child {
+  background-color: #f4eebb;
+}
+
+.tokenInfo table th span.switchSort {
+  cursor: pointer;
+  position: absolute;
+  display: inline-block;
+  right: 0;
+  margin-right: -11pt;
+  width: 20pt;
+};
+
diff --git a/public/translateTable.js b/public/translateTable.js
new file mode 100644
index 0000000..ec8b00a
--- /dev/null
+++ b/public/translateTable.js
@@ -0,0 +1,179 @@
+// Store Table object in global object
+
+var splitRegex = /^([^\/]+?)(?:\/(.+?))?:([^:]+?)$/;
+
+var textFoundry = "Foundry";
+var textLayer = "Layer";
+
+
+// SnippetTable constructor
+function SnippetTable (snippet) {
+  this.info = [];
+  this.foundry = {};
+  this.layer = {};
+  this.pos = 0;
+
+  this.load = function (children) {
+    for (var i in children) {
+      var c = children[i];
+
+      // element with title
+      if (c.nodeType === 1) {
+	if (c.getAttribute("title")) {
+	  if (splitRegex.exec(c.getAttribute("title"))) {
+
+	    // Fill position with info
+	    var foundry, layer;
+	    if (RegExp.$2) {
+	      foundry = RegExp.$1;
+	      layer = RegExp.$2;
+	    }
+	    else {
+	      foundry = "base";
+	      layer = RegExp.$1
+	    };
+
+	    // Create object on position unless it exists
+	    if (!this.info[this.pos])
+	      this.info[this.pos] = {};
+
+	    this.info[this.pos][foundry + "/" + layer] = RegExp.$3;
+
+	    // Set foundry
+	    if (!this.foundry[foundry])
+	      this.foundry[foundry] = {};
+	    this.foundry[foundry][layer] = 1;
+
+	    // Set layer
+	    if (!this.layer[layer])
+	      this.layer[layer] = {};
+	    this.layer[layer][foundry] = 1;
+	  };
+	};
+
+	// depth search
+	if (c.hasChildNodes())
+	  this.load(c.childNodes);
+      }
+
+      // Leaf node - store string on position and go to next string
+      else if (c.nodeType === 3)
+	if (c.nodeValue.match(/[-a-z0-9]/i))
+	  this.info[this.pos++]["-s"] = c.nodeValue;
+    };
+    return this;
+  };
+
+  this.toTable = function (base) {
+    var i, f, l;
+
+    // Create HTML based on info
+    var d = document;
+    var table = d.createElement('table');
+    var tr = d.createElement('tr');
+    table.appendChild(tr);
+    var th = d.createElement('th');
+    th.appendChild(document.createTextNode(base === "layer" ? textLayer : textFoundry));
+
+    // Add icon to switch sorting
+    var span = document.createElement("span");
+
+    // Add switch event
+    var that = this;
+    span.addEventListener("click", function (obj) {
+      var x = that.toTable(base === "layer" ? "foundry" : "layer");
+      table.parentNode.replaceChild(x, table);
+    }, false);
+
+    span.setAttribute("class", "switchSort");
+    var icon = document.createElement("i");
+    icon.setAttribute("class", "fa fa-arrows-h");
+    span.appendChild(icon);
+    th.appendChild(span);
+
+    tr.appendChild(th);
+    th = d.createElement('th');
+    th.appendChild(document.createTextNode(base === "layer" ? textFoundry : textLayer));
+    tr.appendChild(th);
+
+    // Header line with surface strings
+    for (i in this.info) {
+      th = d.createElement('th');
+      tr.appendChild(th);
+      th.appendChild(d.createTextNode(this.info[i]["-s"]));
+    };
+
+    // Sort keys
+    var baseArray = [];
+    if (base === "layer") {
+      for (i in this.layer) {
+	baseArray.push(i);
+      };
+    }
+    else {
+      for (i in this.foundry) {
+	baseArray.push(i);
+      };
+    };
+    baseArray.sort();
+
+    // Annotations
+    for (f in baseArray) {
+      f = baseArray[f];
+      var thBase = d.createElement('th');
+      thBase.appendChild(d.createTextNode(f));
+
+      var rowSpan = 0;
+
+      // Sort keys
+      var subArray = [];
+      if (base === "layer") {
+	for (i in this.layer[f]) {
+	  subArray.push(i);
+	};
+      }
+      else {
+	for (i in this.foundry[f]) {
+	  subArray.push(i);
+	};
+      };
+      subArray.sort();
+
+      for (l in subArray) {
+	l = subArray[l];
+	tr = d.createElement('tr');
+	table.appendChild(tr);
+
+	if (rowSpan === 0)
+	  tr.appendChild(thBase);
+
+	th = d.createElement('th');
+	tr.appendChild(th);
+	th.appendChild(d.createTextNode(l));
+
+	var infoString = base === "layer" ? l + '/' + f : f + '/' + l;
+
+	for (t in this.info) {
+	  var td = d.createElement('td');
+	  tr.appendChild(td);
+
+	  if (this.info[t][infoString] !== undefined)
+	    td.appendChild(d.createTextNode(this.info[t][infoString]));
+	};
+	rowSpan++;
+      };
+      thBase.setAttribute("rowspan", rowSpan);
+    };
+    // return HTML object
+    return table;
+  };
+
+  // Create wrapper element
+  var html = document.createElement("table");
+  html.innerHTML = snippet;
+
+  // Create table object and load data from HTML
+  this.load(html.childNodes);
+};
+
+
diff --git a/public/translateTree.js b/public/translateTree.js
new file mode 100644
index 0000000..728877b
--- /dev/null
+++ b/public/translateTree.js
@@ -0,0 +1,53 @@
+var cleanRegex = /^([^\/]+?\/)?[^\:]+?\:/;
+
+// SnippetTree constructor
+function SnippetTree (obj) {
+  this.children = [];
+  this.data = obj;
+
+  // Replace title
+  this.cleanTitle = function (title) {
+    return title.replace(cleanRegex, "");
+  };
+
+  // Add new child to tree
+  this.addChild = function (childData) {
+    var c = new SnippetTree (childData);
+    this.children.push(c);
+    return c;
+  };
+
+  // Recursively parse children
+  this.parseChildren = function (children) {
+    for (var i in children) {
+      var c = children[i];
+      if (c.nodeType === 1) {
+	if (c.getAttribute("title")) {
+	  var title = this.cleanTitle(c.getAttribute("title"));
+	  var childTree = this.addChild({ type : title });
+	  if (c.hasChildNodes())
+	    childTree.parseChildren(c.childNodes);
+	}
+	else if (c.hasChildNodes())
+	  this.parseChildren(c.childNodes);
+      }
+      else if (c.nodeType === 3)
+	if (c.nodeValue.match(/[-a-z0-9]/i)) {
+	  this.addChild({
+	    type : "leaf",
+	    word : c.nodeValue
+	  });
+	};
+    };
+    return this;
+  };
+};
+
+// Make tree from snippet
+function translateTree (snippet) {
+  var html = document.createElement("tree");
+  html.innerHTML = snippet;
+  return new SnippetTree({ type : "ROOT" }).parseChildren(html.childNodes);
+};
+
+
diff --git a/public/translatehtml.js b/public/translatehtml.js
deleted file mode 100644
index 4a1f4c6..0000000
--- a/public/translatehtml.js
+++ /dev/null
@@ -1,147 +0,0 @@
-var cleanRegex = /^([^\/]+?\/)?[^\:]+?\:/;
-var splitRegex = /^(.+?):([^:]+?)$/;
-
-// SnippetTree constructor
-function SnippetTree (obj) {
-  this.children = [];
-  this.data = obj;
-
-  // Replace title
-  this.cleanTitle = function (title) {
-    return title.replace(cleanRegex, "");
-  };
-
-  // Add new child to tree
-  this.addChild = function (childData) {
-    var c = new SnippetTree (childData);
-    this.children.push(c);
-    return c;
-  };
-
-  // Recursively parse children
-  this.parseChildren = function (children) {
-    for (var i in children) {
-      var c = children[i];
-      if (c.nodeType === 1) {
-	if (c.getAttribute("title")) {
-	  var title = this.cleanTitle(c.getAttribute("title"));
-	  var childTree = this.addChild({ type : title });
-	  if (c.hasChildNodes())
-	    childTree.parseChildren(c.childNodes);
-	}
-	else if (c.hasChildNodes())
-	  this.parseChildren(c.childNodes);
-      }
-      else if (c.nodeType === 3)
-	if (c.nodeValue.match(/[-a-z0-9]/i)) {
-	  this.addChild({
-	    type : "leaf",
-	    word : c.nodeValue
-	  });
-	};
-    };
-    return this;
-  };
-};
-
-
-// SnippetTable constructor
-function SnippetTable (obj) {
-  this.info = [];
-  this.overall = {};
-  this.pos = 0;
-  this.load = function (children) {
-    for (var i in children) {
-      var c = children[i];
-
-      // element with title
-      if (c.nodeType === 1) {
-	if (c.getAttribute("title")) {
-	  if (splitRegex.exec(c.getAttribute("title"))) {
-
-	    // Create object on position unless it exists
-	    if (!this.info[this.pos]) {
-	      this.info[this.pos] = {};
-	    };
-
-	    // Fill position with info
-	    this.info[this.pos][RegExp.$1] = RegExp.$2;
-	    this.overall[RegExp.$1] = 1;
-	  };
-	};
-
-	// depth search
-	if (c.hasChildNodes())
-	  this.load(c.childNodes);
-      }
-
-      // Leaf node - store string on position and go to next string
-      else if (c.nodeType === 3)
-	if (c.nodeValue.match(/[-a-z0-9]/i))
-	  this.info[this.pos++]["-s"] = c.nodeValue;
-    };
-    return this;
-  };
-};
-
-
-// Make tree from snippet
-function translateTree (snippet) {
-  var html = document.createElement("tree");
-  html.innerHTML = snippet;
-  return new SnippetTree({ type : "ROOT" }).parseChildren(html.childNodes);
-};
-
-
-// Make table from snippet
-function translateTable (snippet) {
-  // Create wrapper element
-  var html = document.createElement("table");
-  html.innerHTML = snippet;
-
-  // Create table object and load data from HTML
-  var info = new SnippetTable();
-  info.load(html.childNodes);
-
-  // Sort keys
-  var overallArray = [];
-  for (i in info.overall) {
-    overallArray.push(i);
-  };
-  overallArray.sort();
-
-  // Create HTML based on info
-  var d = document;
-  var table = d.createElement('table');
-  var tr = d.createElement('tr');
-  table.appendChild(tr);
-  var th = d.createElement('th');
-  tr.appendChild(th);
-
-  // Header line with surface strings
-  for (i in info.info) {
-    th = d.createElement('th');
-    tr.appendChild(th);
-    th.appendChild(d.createTextNode(info.info[i]["-s"]));
-  };
-
-  // Annotations
-  for (i in overallArray) {
-    i = overallArray[i];
-
-    tr = d.createElement('tr');
-    table.appendChild(tr);
-    th = d.createElement('th');
-    tr.appendChild(th);
-    th.appendChild(d.createTextNode(i));
-    for (t in info.info) {
-      var td = d.createElement('td');
-      tr.appendChild(td);
-      if (info.info[t][i] !== undefined)
-	td.appendChild(d.createTextNode(info.info[t][i]));
-    };
-  };
-
-  // return HTML object
-  return table;
-};
