diff --git a/dev/demo/all.html b/dev/demo/all.html
index e19b474..d959a6b 100644
--- a/dev/demo/all.html
+++ b/dev/demo/all.html
@@ -40,7 +40,7 @@
         <div id="vc-view"></div>
         in
         <input id="show" name="show" type="hidden" />
-        <input id="collection-name" name="collection-name" type="hidden">
+        <!--<input id="collection-name" name="collection-name" type="hidden"> -->
         <input id="collection" name="collection" type="text" value="">
 	with <span class="menu select">
 	  <select name="ql" id="ql-field">
diff --git a/dev/demo/alldemo.js b/dev/demo/alldemo.js
index 5a3d3c8..02a6190 100644
--- a/dev/demo/alldemo.js
+++ b/dev/demo/alldemo.js
@@ -765,11 +765,18 @@
 
 KorAP.currentQuery = queryExample;
 
+/*
+KorAP.koralQuery["collection"] = {
+  "@type" : "koral:docGroupRef",
+  "ref" : "This is my name"
+};
+*/
+
 require(['app/en', 'init', 'hint/foundries/cnx'], function (lang) {
   KorAP.hintArray = hintArray;
 
   // Set current virtual collection
-  KorAP.currentVC = vcExample;
+  // KorAP.currentVC = vcExample;
 
   // Parse and show the table
   // Override getMatchInfo API call
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 21887f3..d992c3f 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -40,11 +40,6 @@
              selectMenuClass,
              resultPanelClass) {
 
-  // Localization values
-  const loc = KorAP.Locale;
-  loc.VC_allCorpora    = loc.VC_allCorpora    || 'all corpora';
-  loc.VC_oneCollection = loc.VC_oneCollection || 'a virtual corpus';
-
   const d = document;
 
   KorAP.session = sessionClass.create('KalamarJS');
@@ -87,23 +82,35 @@
      */
     var vcname, vcchoose;
     var input = d.getElementById('collection');
+
+    var vc = vcClass.create(vcArray);
+
+    // Add vc name object
     if (input) {
       input.style.display = 'none';
       vcname = d.createElement('span');
       vcname.setAttribute('id', 'vc-choose');
       vcname.classList.add('select');
 
-      var currentVC = loc.VC_allCorpora;
+      // Load virtual corpus object
       if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
-        currentVC = loc.VC_oneCollection;
+        try {
+          vc.fromJson(KorAP.koralQuery["collection"]);
+        }
+        catch (e) {
+          KorAP.log(0,e);
+        }
       };
 
       vcchoose = vcname.addE('span');
-
       vcchoose.addT(
-        d.getElementById('collection-name').value || currentVC
+        vc.getName()
       );
 
+      if (vc.wasRewritten()) {
+        vcchoose.classList.add('rewritten');
+      };
+
       input.parentNode.insertBefore(vcname, input);
     };
 
@@ -245,7 +252,6 @@
      * Toggle the Virtual Collection builder
      */
     if (vcname) {
-      var vc;
       var vcclick = function () {
         var view = d.getElementById('vc-view');
 
@@ -258,8 +264,6 @@
 
         // The vc is not visible
         else {
-          if (vc === undefined)
-            vc = _getCurrentVC(vcClass, vcArray);
           view.appendChild(vc.element());
           vcname.classList.add('active');
           show['collection'] = true;
@@ -271,11 +275,6 @@
       // Click, if the VC should be shown
       if (show['collection']) {
         vcclick.apply();
-      }
-
-      // else
-      else if (_checkVCrewrite(vcClass)) {
-        vcchoose.classList.add('rewritten');
       };
     };
 
@@ -324,11 +323,6 @@
         // Store session information
         KorAP.session.set("show", show);
 
-        // Set Virtual collection 
-        if (vc === undefined) {
-          vc = _getCurrentVC(vcClass, vcArray);
-        };
-
         if (vc !== undefined) {
           input.value = vc.toQuery();
         }
@@ -354,27 +348,3 @@
     return obj;
   });
 });
-
-
-// Render Virtual collection
-function _getCurrentVC (vcClass, vcArray) {
-  var vc = vcClass.create(vcArray);
-  try {
-    if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
-      vc.fromJson(KorAP.koralQuery["collection"]);
-    };
-  }
-  catch (e) {
-    KorAP.log(0, e);
-    return;
-  }
-  return vc;
-};
-
-
-function _checkVCrewrite (vcClass) {
-  if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
-    return vcClass.checkRewrite(KorAP.koralQuery["collection"]);
-  };
-  return false;
-}
