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;
     }
   };
