diff --git a/dev/js/src/buttongroup/menu.js b/dev/js/src/buttongroup/menu.js
index 4615564..bebaac4 100644
--- a/dev/js/src/buttongroup/menu.js
+++ b/dev/js/src/buttongroup/menu.js
@@ -8,10 +8,10 @@
 
     /**
      * Create new menu object.
-     * Pass the match information object
+     * Pass the panel object
      * and the item parameters.
      *
-     * @param info The match info object
+     * @param panel The panel object
      * @param params The match menu items
      *   as an array of arrays.
      */
@@ -37,15 +37,13 @@
     },
 
     /**
-     * The match information object of the menu.
-     * TODO:
-     *   Rename to 'Panel'
+     * The panel object of the menu.
      */
-    info :function (infoVar) {
-      if (infoVar !== undefined)
-        this._info = infoVar;
+    panel :function (panelVar) {
+      if (panelVar !== undefined)
+        this._panel = panelVar;
 
-      return this._info;
+      return this._panel;
     },
 
     // Attach menu to button
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index 1a89a8f..66def11 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -34,9 +34,8 @@
   return {
 
     /**
-     * Create a new annotation object.
-     * Expects an array of available foundry/layer=type terms.
-     * Supported types are 'spans', 'tokens' and 'rels'.
+     * Create a new match object.
+     * Expects an element with match descriptions.
      */
     create : function (match) {
       return Object.create(this)._init(match);
@@ -147,12 +146,12 @@
      * Open match
      */
     open : function () {
-
+      
       // Add actions unless it's already activated
       var element = this._element;
 
       // There is an element to open
-      if (this._element === undefined || this._element === null)
+      if (element === undefined || element === null)
         return false;
 
       // The element is already opened
@@ -187,16 +186,16 @@
       if (!refLine)
         return;
       
-      var panel = matchPanelClass.create(this);
+      this.panel = matchPanelClass.create(this);
 
       this._element.insertBefore(
-        panel.element(),
+        this.panel.element(),
         this._element.querySelector("p.ref")
       );
 
       // Insert before reference line
       refLine.insertBefore(
-        panel.actions.element(),
+        this.panel.actions.element(),
         refLine.firstChild
       );
 
diff --git a/dev/js/src/match/treeitem.js b/dev/js/src/match/treeitem.js
index 68ffe8c..d99165a 100644
--- a/dev/js/src/match/treeitem.js
+++ b/dev/js/src/match/treeitem.js
@@ -56,8 +56,8 @@
       var menu = this.menu();
       menu.hide();
       e.halt();
-      if (menu.info() !== undefined) {
-	      menu.info().showTree(this._foundry, this._layer, this._type);
+      if (menu.panel() !== undefined) {
+	      menu.panel().addTree(this._foundry, this._layer, this._type);
       };
     },
 
diff --git a/dev/js/src/panel/match.js b/dev/js/src/panel/match.js
index aba8873..2b220d3 100644
--- a/dev/js/src/panel/match.js
+++ b/dev/js/src/panel/match.js
@@ -35,7 +35,8 @@
 
       var a = this.actions;
 
-      // Ugly hack!
+      // TODO:
+      //   Ugly hack!
       var cl= a.element().classList;
       cl.remove('matchinfo');
       cl.add('button-matchinfo');
@@ -67,7 +68,7 @@
           var tm = KorAP.TreeMenu;
 
           // Set panel
-          tm.info(this);
+          tm.panel(this);
 
           // Reread list
           tm.readItems(this._treeMenuList());
@@ -107,8 +108,7 @@
     /**
      * Add Tree view to panel
      */
-    // TODO: Rename to addTree() - this is called in treeitem.js
-    showTree : function (foundry, layer, type) {
+    addTree : function (foundry, layer, type) {
       this.add(
         relationsView.create(this._match, foundry, layer, type)
       );
diff --git a/dev/js/src/view/match/tokentable.js b/dev/js/src/view/match/tokentable.js
index 70e8a8f..f0d2fd2 100644
--- a/dev/js/src/view/match/tokentable.js
+++ b/dev/js/src/view/match/tokentable.js
@@ -13,7 +13,6 @@
 
 
     _init : function (match) {
-      console.log(match);
       this._match = match;
       return this;
     },
