diff --git a/dev/js/runner/all.html b/dev/js/runner/all.html
index c58471c..d2d6f25 100644
--- a/dev/js/runner/all.html
+++ b/dev/js/runner/all.html
@@ -43,6 +43,7 @@
         'spec/panelSpec',
         'spec/pluginSpec',
         'spec/queryCreatorSpec',
+        'spec/corpusByMatchSpec',
         'spec/statSpec',
         'spec/vcSpec'
       ],
diff --git a/dev/js/spec/corpusByMatchSpec.js b/dev/js/spec/corpusByMatchSpec.js
new file mode 100644
index 0000000..d2588b0
--- /dev/null
+++ b/dev/js/spec/corpusByMatchSpec.js
@@ -0,0 +1,50 @@
+/**
+ * Specification for the corpusByMatch assistant.
+ */
+
+function metaTableFactory () {
+  var meta = document.createElement('div');
+  meta.className = 'view metaTable';
+  meta.innerHTML =
+    "    <dl class=\"flex\">" +
+    "      <div>" +
+    "        <dt title=\"author\">author</dt>" +
+    "        <dd>Sprachpfleger, u.a.</dd>" +
+    "      </div>" +
+    "      <div>" +
+    "        <dd class=\"metakeyvalues\">" +
+    "          <div>corenlp</div>" +
+    "          <div>corenlp/constituency</div>" +
+    "          <div>corenlp/morpho</div>" +
+    "          <div>corenlp/sentences</div>" +
+    "          <div>dereko</div>" +
+    "          <div>dereko/structure</div>" +
+    "          <div>dereko/structure/base-sentences-paragraphs-pagebreaks</div>" +
+    "          <div>opennlp</div>" +
+    "          <div>opennlp/morpho</div>" +
+    "          <div>opennlp/sentences</div>" +
+    "        </dd>" +
+    "      </div>" +
+    "    </dl>";
+  var parent = document.createElement("div");
+  parent.appendChild(meta);
+  return meta;
+};
+
+define(['match/corpusByMatch'], function (cbmClass) {  
+  describe('KorAP.CorpusByMatch', function () {
+    it('should be initializable', function () {
+      expect(function () {
+        cbmClass.create()
+      }).toThrow(new Error("Missing parameters"));
+
+      expect(
+	      function() {
+          cbmClass.create("Test")
+        }
+      ).toThrow(new Error("Requires element"));
+
+      expect(cbmClass.create(metaTableFactory()).toString()).toEqual("");
+    });
+  });
+});
diff --git a/dev/js/spec/queryCreatorSpec.js b/dev/js/spec/queryCreatorSpec.js
index 21fffac..5c5cddf 100644
--- a/dev/js/spec/queryCreatorSpec.js
+++ b/dev/js/spec/queryCreatorSpec.js
@@ -2,13 +2,13 @@
  * Specification for the query creator.
  */
 
+
+Element.prototype.innerString = function () {
+  return this.innerText.split("\n").join("");
+};
+
 function matchTableFactory () {
   var table = document.createElement('div');
-
-  Element.prototype.innerString = function () {
-    return this.innerText.split("\n").join("");
-  };
-
   
   table.className = 'matchtable';
   table.innerHTML = 
@@ -131,7 +131,7 @@
       expect(qc.shown()).toBe(false);
       qc.show();
       expect(qc.shown()).toBe(false);
-      expect(qc.element().className).toEqual("queryfragment");
+      expect(qc.element().className).toEqual("query fragment");
 
       // Click on cell 0:0 "Foundry"
       var cell = matchTable.querySelector("thead > tr > th:first-child");
@@ -292,7 +292,7 @@
       expect(qc.shown()).toBe(false);
       qc.show();
       expect(qc.shown()).toBe(false);
-      expect(qc.element().className).toEqual("queryfragment");
+      expect(qc.element().className).toEqual("query fragment");
 
       var cell = matchTable.querySelector("tbody > tr:nth-child(2) > td:nth-child(4)");
       expect(cell.innerString()).toEqual("ADJA");
@@ -319,7 +319,7 @@
       expect(qc.shown()).toBe(false);
       qc.show();
       expect(qc.shown()).toBe(false);
-      expect(qc.element().className).toEqual("queryfragment");
+      expect(qc.element().className).toEqual("query fragment");
 
       var cell = matchTable.querySelector("thead > tr > th:nth-child(5)");
       expect(cell.innerString()).toEqual("lebende");
@@ -352,7 +352,7 @@
       expect(qc.shown()).toBe(false);
       qc.show();
       expect(qc.shown()).toBe(false);
-      expect(qc.element().className).toEqual("queryfragment");
+      expect(qc.element().className).toEqual("query fragment");
 
       var corenlpRow = matchTable.querySelector("tbody > tr:nth-child(1)");
 
@@ -471,7 +471,7 @@
       expect(qc.shown()).toBe(false);
       qc.show();
       expect(qc.shown()).toBe(false);
-      expect(qc.element().className).toEqual("queryfragment");
+      expect(qc.element().className).toEqual("query fragment");
 
       var cell = matchTable.querySelector("thead > tr > th:nth-child(5)");
       expect(cell.innerString()).toEqual("lebende");
diff --git a/dev/js/src/match/corpusByMatch.js b/dev/js/src/match/corpusByMatch.js
new file mode 100644
index 0000000..1c0bead
--- /dev/null
+++ b/dev/js/src/match/corpusByMatch.js
@@ -0,0 +1,37 @@
+define(['vc/fragment', 'util'], function (vcFragmentClass) {
+  "use strict";
+
+  return {
+    /**
+     * Constructor
+     */
+    create : function (meta) {
+      return Object.create(this)._init(meta);
+    },
+
+    // Initialize corpusByMatch
+    _init : function (meta) {
+      if (meta === undefined) {
+        throw new Error('Missing parameters');
+      }
+      else if (!(meta instanceof Node)) {
+        throw new Error("Requires element");
+      };
+
+      // Collect the meta constraints
+      this._vc = {};
+
+      // Remember the meta table
+      this._meta = meta;
+
+      this._fragment = vcFragmentClass.create();
+
+      return this;
+    },
+
+    // Stringify annotation
+    toString : function () {
+      return '';
+    }
+  };
+});
diff --git a/dev/js/src/match/meta.js b/dev/js/src/match/meta.js
index 8667953..d4b2d7f 100644
--- a/dev/js/src/match/meta.js
+++ b/dev/js/src/match/meta.js
@@ -1,4 +1,4 @@
-define(['util'], function () {
+define(['match/corpusByMatch','util'], function (cbmClass) {
 
   // Localization values
   const loc   = KorAP.Locale;
@@ -55,7 +55,7 @@
         var value = fields[i].value;      	
         metaInfo[fields[i].key] = value;	
       };
-    
+      
       // console.log(fields);   
       
       // TODO: Meta fields should be separated
@@ -63,13 +63,15 @@
       
       for (var i in keys.sort()) {
         var k = keys[i];
+
+        // Ignore internal IDs
         if (k !== "UID" &&
             k !== "corpusID" &&
             k !== "docID" &&
             k !== "textID" &&
             /*
-            k !== "corpusSigle" &&
-            k !== "docSigle" &&
+              k !== "corpusSigle" &&
+              k !== "docSigle" &&
             */
             k !== "layerInfos") {
 
@@ -83,18 +85,20 @@
           metaDD =  metaL.addE('dd');
           
           if(metaDescr instanceof Array){
-        	metaDD.classList.add("metakeyvalues");  
-        	for(i = 0; i < metaDescr.length; i++){
-        	metaDD.addE('div').addT(metaDescr[i]);
-        	} 
+        	  metaDD.classList.add("metakeyvalues");  
+        	  for(i = 0; i < metaDescr.length; i++){
+        	    metaDD.addE('div').addT(metaDescr[i]);
+        	  } 
           }
           else{
-          metaDD.addT(metaInfo[k]);
+            metaDD.addT(metaInfo[k]);
           }
-      
+          
           metaDL.appendChild(metaL);
         };
       };
+
+      this._corpusByMatch = cbmClass.create(this._element);
       return this._element;
     }
   };
