diff --git a/dev/js/src/datepicker.js b/dev/js/src/datepicker.js
index 59a3ec2..8608efe 100644
--- a/dev/js/src/datepicker.js
+++ b/dev/js/src/datepicker.js
@@ -118,6 +118,18 @@
       return this._element;
     },
 
+    /**
+     * Get the current date in string format.
+     */
+    today : function () {
+      var today = new Date();
+      var str = today.getYear() + 1900;
+      var m = today.getMonth() + 1;
+      var d = today.getDate();
+      str += '-' + (m < 10 ? '0' + m : m);
+      str += '-' + (d < 10 ? '0' + d : d);
+      return str;
+    },
 
     /**
      * Increment the year.
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 7938a9e..da94a73 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -8,6 +8,7 @@
   'lib/alertify',
   'api',
   'mailToChiffre',
+  'lib/highlight/highlight.pack',
   'util'
 ], function (matchClass,
 	     hintClass,
@@ -155,6 +156,15 @@
     // Initialize documentation links
     obj.tutorial.initDocLinks(document);
 
+    if (KorAP.currentQuery !== undefined) {
+      var sb = document.getElementById('searchbar');
+      var kq = document.createElement('div');
+      kq.setAttribute('id', 'koralquery');
+      sb.parentNode.insertBefore(kq, sb.nextSibling);
+      kq.innerHTML = JSON.stringify(KorAP.currentQuery, null, '  ');
+      hljs.highlightBlock(kq);
+    };
+
     /**
      * Init hint helper
      * has to be final because of
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 1aed3cf..5cf2284 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -192,6 +192,7 @@
     root : function (obj) {
       if (arguments.length === 1) {
 	var e = this.element();
+
 	if (e.firstChild !== null) {
 	  if (e.firstChild !== obj.element()) {
 	    e.replaceChild(obj.element(), e.firstChild);
@@ -225,7 +226,7 @@
 
       // Initialize root
       this._element.appendChild(this._root.element());
-
+      
       return this._element;
     },
 
@@ -239,6 +240,42 @@
       return this;
     },
 
+    /**
+     * Make the vc persistant by injecting the current timestamp
+     * as a creation date limit criterion.
+     */
+    makePersistant : function () {
+//      this.root().wrapOnRoot('and');
+      var todayStr = KorAP._vcDatePicker.today();
+      var doc = docClass.create();
+      var root = this.root();
+
+      if (root.ldType() === 'docGroup' &&
+	  root.operation === 'and') {
+	root.append(cond);
+      }
+      else {
+	root.wrapOnRoot('and');
+	root.append(doc);
+      };
+
+      doc.key("creationDate");
+      doc.type("date");
+      doc.matchop("leq");
+      doc.value(todayStr);
+
+/*
+ {
+	"@type" : "koral:doc",
+	"key" : "creationDate",
+	"type" : "type:date",
+	"match" : "match:leq",
+	"value" : todayStr
+      }
+      this.root().append(cond);
+*/
+      this.update();
+    },
 
     /**
      * Get the generated json string
