diff --git a/dev/js/src/hint.js b/dev/js/src/hint.js
index 1db2fd0..4f55d0f 100644
--- a/dev/js/src/hint.js
+++ b/dev/js/src/hint.js
@@ -4,6 +4,12 @@
  *
  * @author Nils Diewald
  */
+/*
+ * TODO: List can be shown when prefix is like 'base/s=pcorenlp/'
+ * TODO: Sometimes the drop-down box down vanish when list is shown
+ * TODO: Create should expect an input text field
+ * TODO: Embed only one single menu (not multiple)
+ */
 define([
   'hint/input',
   'hint/menu',
@@ -24,7 +30,7 @@
     "(?:[-_a-zA-Z0-9]+?)=" +   // Layer
     "(?:"+
     "(?:[^:=\/ ]+?):|" +       // Key
-    "(?:[^-=\/ ]+?)-" +       // Node
+    "(?:[^-=\/ ]+?)-" +        // Node
     ")?" +
     ")?" +
     ")$";
@@ -106,10 +112,27 @@
       return this;
     },
 
+
+    /**
+     * Return the input field attached to the hint helper.
+     */
     inputField : function () {
       return this._inputField;
     },
 
+
+    /**
+     * Altert at a specific character position.
+     */
+    charAlert : function (charPos, msg) {
+      this._inputField.moveto(charPos);
+      var c = this._inputField.container();
+      c.classList.add('active');
+      var error = c.appendChild(document.createElement('div'));
+      error.classList.add('alert', 'hint');
+      error.appendChild(document.createTextNode(msg));
+    },
+
     /**
      * Return hint menu and probably init based on an action
      */
@@ -148,7 +171,9 @@
 
 
     /**
-     * Show the menu
+     * Show the menu.
+     * Currently this means that multiple menus may be loaded
+     * but not shown.
      */
     show : function (ifContext) {
 
@@ -164,8 +189,8 @@
 	c.appendChild(menu.element());
 	menu.show();
 	menu.focus();
-      // Focus on input field
-      // this.inputField.element.focus();
+	// Focus on input field
+	// this.inputField.element.focus();
       };
     }
   };
diff --git a/dev/js/src/hint/input.js b/dev/js/src/hint/input.js
index c12d26a..6e02793 100644
--- a/dev/js/src/hint/input.js
+++ b/dev/js/src/hint/input.js
@@ -1,4 +1,8 @@
 // Input field for queries
+/*
+ * TODO: Support allert for query problems.
+ */
+
 define({
 
   /**
@@ -7,38 +11,7 @@
   create : function (element) {
     return Object.create(this)._init(element);
   },
-  
-  // Initialize new input field
-  _init : function (element) {
-    this._element = element;
 
-    // Create mirror for searchField
-    if ((this._mirror = document.getElementById("searchMirror")) === null) {
-      this._mirror = document.createElement("div");
-      this._mirror.setAttribute("id", "searchMirror");
-      this._mirror.appendChild(document.createElement("span"));
-      this._container = this._mirror.appendChild(document.createElement("div"));
-      this._mirror.style.height = "0px";
-      document.getElementsByTagName("body")[0].appendChild(this._mirror);
-    };
-
-    // Update position of the mirror
-    var that = this;
-    var repos = function () {
-      that.reposition();
-    };
-    window.addEventListener('resize', repos);
-    this._element.addEventListener('onfocus', repos);
-    that.reposition();
-
-    return this;
-  },
-
-  // Get the right position
-  _rightPos : function () {
-    var box = this._mirror.firstChild.getBoundingClientRect();
-    return box.right - box.left;
-  },
 
   /**
    * Get the mirrored input field.
@@ -50,8 +23,9 @@
 
   /**
    * Get the container element.
-   * This contains the mirror and
-   * the hint helper.
+   * This contains the hint helper / menus
+   * and probably an
+   * error message.
    */
   container : function () {
     return this._container;
@@ -66,6 +40,7 @@
     return this._element;
   },
 
+
   /**
    * Get the value of the input field
    * the hint helper is attached to.
@@ -81,8 +56,10 @@
   update : function () {
     this._mirror.firstChild.textContent = this._split()[0];
     this._container.style.left = this._rightPos() + 'px';
+    return this;
   },
 
+
   /**
    * Insert text into the mirror.
    * This is a prefix of the input field's
@@ -94,9 +71,21 @@
     s.value = splittedText[0] + text + splittedText[1];
     s.selectionStart = (splittedText[0] + text).length;
     s.selectionEnd = s.selectionStart;
+
+    // Maybe update?
     this._mirror.firstChild.textContent = splittedText[0] + text;
+    return this;
   },
-  
+
+  /**
+   * Move hinthelper to given character position
+   */
+  moveto : function (charpos) {
+    this._element.selectionStart = charpos;
+    this._element.selectionEnd = charpos;
+    this._element.focus();
+    return this.update();
+  },
 
   /**
    * Reposition the input mirror directly
@@ -124,6 +113,7 @@
     mirrorStyle.fontFamily      = inputStyle.getPropertyValue("font-family");
   },
 
+
   /**
    * Get the context, which is the input
    * field's value bounded to the
@@ -133,14 +123,49 @@
     return this._split()[0];
   },
 
+  
+  // Initialize new input field
+  _init : function (element) {
+    this._element = element;
+
+    // Create mirror for searchField
+    // This is important for positioning
+    if ((this._mirror = document.getElementById("searchMirror")) === null) {
+      this._mirror = document.createElement("div");
+      this._mirror.setAttribute("id", "searchMirror");
+      this._mirror.appendChild(document.createElement("span"));
+      this._container = this._mirror.appendChild(document.createElement("div"));
+      this._mirror.style.height = "0px";
+      document.getElementsByTagName("body")[0].appendChild(this._mirror);
+    };
+
+    // Update position of the mirror
+    window.addEventListener('resize', this.reposition.bind(this));
+    this._element.addEventListener('onfocus', this.reposition.bind(this));
+    this.reposition();
+    return this;
+  },
+
+  // Get the right position
+  _rightPos : function () {
+    var box = this._mirror.firstChild.getBoundingClientRect();
+    return box.right - box.left;
+  },
+
+
   /*
    * Return two substrings,
-   * splitted at the current cursor position.
+   * splitted at a given position
+   * or at the current cursor position.
    */
-  _split : function () {
+  _split : function (start) {
     var s = this._element;
     var value = s.value;
-    var start = s.selectionStart;
+
+    // Get start from cursor position
+    if (arguments.length === 0)
+      start = s.selectionStart;
+
     return new Array(
       value.substring(0, start),
       value.substring(start, value.length)
diff --git a/dev/js/src/hint/item.js b/dev/js/src/hint/item.js
index b9a1bc8..7d97334 100644
--- a/dev/js/src/hint/item.js
+++ b/dev/js/src/hint/item.js
@@ -52,8 +52,7 @@
 
       // Update input field
       var input = h.inputField();
-      input.insert(this._action);
-      input.update();
+      input.insert(this._action).update();
 
       h.active = false;
 
diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index 4d9df49..e8028ea 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -8,6 +8,7 @@
  * TODO: Show the slider briefly on move (whenever screen is called).
  * TODO: Ignore alt+ and strg+ key strokes.
  * TODO: Should scroll to a chosen value after prefixing, if the chosen value is live
+ * Add a "title" to a menu that is not scrollable.
  */
 define([
   'menu/item',
