diff --git a/dev/js/spec/matchSpec.js b/dev/js/spec/matchSpec.js
index e52132c..dc2186d 100644
--- a/dev/js/spec/matchSpec.js
+++ b/dev/js/spec/matchSpec.js
@@ -28,46 +28,48 @@
 };
 
 var snippet = "<span title=\"cnx/l:meist\">" +
-  "  <span title=\"cnx/p:ADV\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:meist\">" +
-  "        <span title=\"mate/l:meist\">" +
-  "          <span title=\"mate/p:ADV\">" +
-  "            <span title=\"opennlp/p:ADV\">meist</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:deutlich\">" +
-  "  <span title=\"cnx/p:A\">" +
-  "    <span title=\"cnx/syn:@PREMOD\">" +
-  "      <span title=\"mate/l:deutlich\">" +
-  "        <span title=\"mate/m:degree:pos\">" +
-  "          <span title=\"mate/p:ADJD\">" +
-  "            <span title=\"opennlp/p:ADJD\">deutlich</span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>" +
-  "<span title=\"cnx/l:fähig\">" +
-  "  <span title=\"cnx/l:leistung\">" +
-  "    <span title=\"cnx/p:A\">" +
-  "      <span title=\"cnx/syn:@NH\">" +
-  "        <span title=\"mate/l:leistungsfähig\">" +
-  "          <span title=\"mate/m:degree:comp\">" +
-  "            <span title=\"mate/p:ADJD\">" +
-  "              <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
-  "            </span>" +
-  "          </span>" +
-  "        </span>" +
-  "      </span>" +
-  "    </span>" +
-  "  </span>" +
-  "</span>";
+    "  <span title=\"cnx/p:ADV\">" +
+    "    <span title=\"cnx/syn:@PREMOD\">" +
+    "      <span title=\"mate/l:meist\">" +
+    "        <span title=\"mate/l:meist\">" +
+    "          <span title=\"mate/p:ADV\">" +
+    "            <span title=\"opennlp/p:ADV\">meist</span>" +
+    "          </span>" +
+    "        </span>" +
+    "      </span>" +
+    "    </span>" +
+    "  </span>" +
+    "</span>" +
+    "<span title=\"cnx/l:deutlich\">" +
+    "  <span title=\"cnx/p:A\">" +
+    "    <span title=\"cnx/syn:@PREMOD\">" +
+    "      <span title=\"mate/l:deutlich\">" +
+    "        <span title=\"mate/m:degree:pos\">" +
+    "          <span title=\"mate/p:ADJD\">" +
+    "            <span title=\"opennlp/p:ADJD\">deutlich</span>" +
+    "          </span>" +
+    "        </span>" +
+    "      </span>" +
+    "    </span>" +
+    "  </span>" +
+    "</span>" +
+    "<span title=\"cnx/l:fähig\">" +
+    "  <span title=\"cnx/l:leistung\">" +
+    "    <span title=\"cnx/p:A\">" +
+    "      <span title=\"cnx/p:ADJA\">" +
+    "        <span title=\"cnx/syn:@NH\">" +
+    "          <span title=\"mate/l:leistungsfähig\">" +
+    "            <span title=\"mate/m:degree:comp\">" +
+    "              <span title=\"mate/p:ADJD\">" +
+    "                <span title=\"opennlp/p:ADJD\">leistungsfähiger</span>" +
+    "              </span>" +
+    "            </span>" +
+    "          </span>" +
+    "        </span>" +
+    "      </span>" +
+    "    </span>" +
+    "  </span>" +
+    "</span>";
 
 var treeSnippet =
   "<span class=\"context-left\"></span>" +
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index da56e29..d889026 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -68,15 +68,6 @@
     getValue : function (pos, foundry, layer) {
       return this._info[pos][foundry + '/' + layer]
     },
-    
-    /*
-      getLayerPerFoundry : function (foundry) {
-        return this._foundry[foundry]
-      },
-      getFoundryPerLayer : function (layer) {
-        return this._layer[layer];
-      },
-    */
 
     // Parse the snippet
     _parse : function (children) {
@@ -170,11 +161,27 @@
         if (name === undefined)
           return c;
 
-        if (name instanceof Array) {
-          for (var n = 0; n < name.length; n++) {
-            c.appendChild(d.createTextNode(name[n]));
-            if (n !== name.length - 1) {
-              c.appendChild(d.createElement('br'));
+        if (name instanceof Array && name[1] !== undefined) {
+
+          // There are multiple values to add
+
+          // These are andgroups
+          if (name.some(function (item) { return item.indexOf(':') == -1 ? false : true})) {
+            c.classList.add('matchkeyvalues');
+            for (var n = 0; n < name.length; n++) {
+              var text = d.createTextNode(name[n]);
+              var e = c.appendChild(d.createElement('div'));
+              e.appendChild(text);
+            };
+          }
+
+          // Add alternatives
+          else {
+            for (var n = 0; n < name.length; n++) {
+              c.appendChild(d.createTextNode(name[n]));
+              if (n !== name.length - 1) {
+                c.appendChild(d.createElement('br'));
+              };
             };
           };
         }
