diff --git a/dev/js/spec/statSpec.js b/dev/js/spec/statSpec.js
index 94be3f2..cb9d713 100644
--- a/dev/js/spec/statSpec.js
+++ b/dev/js/spec/statSpec.js
@@ -164,7 +164,7 @@
 
       expect(show.querySelector(".statistic").tagName).toEqual("SPAN");
 
-      var and = vc.element().firstChild.lastChild.firstChild;
+      var and = vc.builder().lastChild.firstChild;
 
       // Click on and() in VC
       and.click();
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index b60dc5d..3edfdf8 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -424,6 +424,10 @@
     });
 
     it('should be deserializable', function () {
+
+      // Reset list
+      KorAP._vcKeyMenu = menuClass.create([['referTo','ref']]);
+      
       var docGroup = docGroupFactory.create();
       expect(docGroup.operation()).toEqual("and");
       expect(docGroup.operands().length).toEqual(2);
@@ -471,7 +475,7 @@
       var op3 = docGroup.getOperand(2);
       expect(op3.ldType()).toEqual("docGroup");
       expect(op3.operation()).toEqual("or");
-
+    
       var op4 = op3.getOperand(0);
       expect(op4.ldType()).toEqual("doc");
       expect(op4.type()).toEqual("string");
@@ -750,14 +754,13 @@
         ["pubDate", "date"]
       ]);
       expect(vc.toQuery()).toEqual("");
-      expect(vc.element().firstChild.textContent).toEqual("⋯");
-      vc.element().firstChild.firstChild.click();
+      expect(vc.builder().firstChild.textContent).toEqual("⋯");
+      vc.builder().firstChild.firstChild.click();
 
       // Click on pubDate
       vc.element().firstChild.getElementsByTagName("LI")[1].click();
-
-      expect(vc.element().firstChild.firstChild.textContent).toEqual("pubDate");
-      expect(vc.element().firstChild.children[1].getAttribute("data-type")).toEqual("date");
+      expect(vc.builder().firstChild.firstChild.textContent).toEqual("pubDate");
+      expect(vc.builder().firstChild.children[1].getAttribute("data-type")).toEqual("date");
     });    
   });
 
@@ -800,7 +803,7 @@
       });
       expect(vc.toQuery()).toEqual("Titel = \"Baum\"");
 
-      var vcE = vc.element();
+      var vcE = vc.builder();
       expect(vcE.firstChild.children.length).toEqual(4);
 
       // Click to delete
@@ -831,7 +834,7 @@
 
       expect(vc.toQuery()).toEqual("Titel = \"Baum\"");
 
-      var vcE = vc.element();
+      var vcE = vc.builder();
       expect(vcE.firstChild.children.length).toEqual(4);
 
       // Click to delete
@@ -1149,9 +1152,9 @@
         "ref":"myCorpus"
       });
 
-      // iv class="doc groupref"><span class="key fixed">referTo</span><span data-type="string" class="value">myCorpus</span>
-      var vcE = vc.element();
-      expect(vcE.getAttribute('class')).toEqual('vc');
+      // iv class="doc groupref"><span class="key fixed">@referTo</span><span data-type="string" class="value">myCorpus</span>
+      var vcE = vc.builder();
+      expect(vcE.getAttribute('class')).toEqual('builder');
       expect(vcE.firstChild.tagName).toEqual('DIV');
       expect(vcE.firstChild.classList.contains('groupref')).toBeTruthy();
 
@@ -1170,15 +1173,15 @@
     it('should be based on a nested docGroup', function () {
       var vc = nestedGroupFactory.create();
 
-      expect(vc.element().getAttribute('class')).toEqual('vc');
-      expect(vc.element().firstChild.getAttribute('class')).toEqual('docGroup');
-      expect(vc.element().firstChild.children[0].getAttribute('class')).toEqual('doc');
-      var dg = vc.element().firstChild.children[1];
+      expect(vc.builder().getAttribute('class')).toEqual('builder');
+      expect(vc.builder().firstChild.getAttribute('class')).toEqual('docGroup');
+      expect(vc.builder().firstChild.children[0].getAttribute('class')).toEqual('doc');
+      var dg = vc.builder().firstChild.children[1];
       expect(dg.getAttribute('class')).toEqual('docGroup');
       expect(dg.children[0].getAttribute('class')).toEqual('doc');
       expect(dg.children[1].getAttribute('class')).toEqual('doc');
       expect(dg.children[2].getAttribute('class')).toEqual('operators button-group');
-      expect(vc.element().firstChild.children[2].getAttribute('class')).toEqual('operators button-group');
+      expect(vc.builder().firstChild.children[2].getAttribute('class')).toEqual('operators button-group');
     });    
 
     it('should be based on a nested docGroupRef', function () {
@@ -1904,8 +1907,8 @@
       expect(vc.root().operation()).toEqual('or');
 
       // Operands and operators
-      expect(vc.element().firstChild.children.length).toEqual(4);
-      expect(vc.element().firstChild.lastChild.getAttribute('class')).toEqual('operators button-group');
+      expect(vc.builder().firstChild.children.length).toEqual(4);
+      expect(vc.builder().firstChild.lastChild.getAttribute('class')).toEqual('operators button-group');
 
       // Remove inner group and flatten
       _delOn(vc.root().getOperand(2).getOperand(0));
@@ -1917,8 +1920,8 @@
       expect(vc.root().operation()).toEqual('or');
 
       // Operands and operators
-      expect(vc.element().firstChild.children.length).toEqual(5);
-      expect(vc.element().firstChild.lastChild.getAttribute('class')).toEqual('operators button-group');
+      expect(vc.builder().firstChild.children.length).toEqual(5);
+      expect(vc.builder().firstChild.lastChild.getAttribute('class')).toEqual('operators button-group');
     });
   });
 
@@ -1981,7 +1984,7 @@
 
       expect(vc.toQuery()).toEqual('pubDate in 2014-12-05 & foo = "bar" & referTo "myCorpus"');
 
-      var fc = vc.element().firstChild;
+      var fc = vc.builder().firstChild;
       expect(fc.getAttribute('data-operation')).toEqual('and');
       expect(fc.children.length).toEqual(4);
       expect(fc.lastChild.getAttribute('class')).toEqual('operators button-group');
@@ -1993,7 +1996,7 @@
       _andOn(vc.root().getOperand(0));
       expect(vc.toQuery()).toEqual('pubDate in 2014-12-05 & foo = "bar" & referTo "myCorpus"');
 
-      fc = vc.element().firstChild;
+      fc = vc.builder().firstChild;
       expect(fc.getAttribute('data-operation')).toEqual('and');
       expect(fc.children.length).toEqual(5);
       expect(fc.lastChild.getAttribute('class')).toEqual('operators button-group');
@@ -2045,7 +2048,7 @@
 
       expect(vc.toQuery()).toEqual('pubDate in 2014-12-05 & foo = "bar" & referTo "myCorpus"');
 
-      var fc = vc.element().firstChild;
+      var fc = vc.builder().firstChild;
       expect(fc.children.length).toEqual(4);
       expect(fc.lastChild.getAttribute('class')).toEqual('operators button-group');
       expect(fc.children[0].getAttribute('class')).toEqual('doc');
@@ -2055,7 +2058,7 @@
       // add with 'or' in the middle
       _orOn(vc.root().getOperand(0));
       expect(vc.toQuery()).toEqual('pubDate in 2014-12-05 & foo = "bar" & referTo "myCorpus"');
-      fc = vc.element().firstChild;
+      fc = vc.builder().firstChild;
 
       expect(fc.getAttribute('data-operation')).toEqual('and');
       expect(fc.children.length).toEqual(4);
@@ -2066,7 +2069,7 @@
       expect(fc.children[3].getAttribute('class')).toEqual('operators button-group');
       expect(fc.lastChild.getAttribute('class')).toEqual('operators button-group');
 
-      fc = vc.element().firstChild.firstChild;
+      fc = vc.builder().firstChild.firstChild;
       expect(fc.children.length).toEqual(3);
       expect(fc.children[0].getAttribute('class')).toEqual('doc');
       expect(fc.children[1].getAttribute('class')).toEqual('doc unspecified');
@@ -2074,7 +2077,7 @@
       expect(fc.lastChild.getAttribute('class')).toEqual('operators button-group');
 
       _orOn(vc.root().getOperand(2));
-      fc = vc.element().firstChild;
+      fc = vc.builder().firstChild;
       expect(fc.children.length).toEqual(4);
 
       expect(fc.children[0].getAttribute('class')).toEqual('docGroup');
@@ -2082,7 +2085,7 @@
       expect(fc.children[2].getAttribute('class')).toEqual('docGroup');
       expect(fc.children[3].getAttribute('class')).toEqual('operators button-group');
 
-      fc = vc.element().firstChild.children[2];
+      fc = vc.builder().firstChild.children[2];
       expect(fc.children[0].getAttribute('class')).toEqual('doc groupref');
       expect(fc.children[1].getAttribute('class')).toEqual('doc unspecified');
       expect(fc.children[2].getAttribute('class')).toEqual('operators button-group');
@@ -2584,14 +2587,14 @@
         ['b', 'string'],
         ['c', 'date']
       ]).fromJson();
-      expect(vc.element().firstChild.classList.contains('unspecified')).toBeTruthy();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('SPAN');
+      expect(vc.builder().firstChild.classList.contains('unspecified')).toBeTruthy();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('SPAN');
 
       // Click on unspecified
-      vc.element().firstChild.firstChild.click();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('UL');
+      vc.builder().firstChild.firstChild.click();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('UL');
 
-      var list = vc.element().firstChild.firstChild;
+      var list = vc.builder().firstChild.firstChild;
       expect(list.getElementsByTagName("LI")[0].innerText).toEqual('referTo');
       expect(list.getElementsByTagName("LI")[1].innerText).toEqual('a');
       expect(list.getElementsByTagName("LI")[2].innerText).toEqual('b');
@@ -2602,14 +2605,14 @@
         ['e', 'string'],
         ['f', 'date']
       ]).fromJson();
-      expect(vc.element().firstChild.classList.contains('unspecified')).toBeTruthy();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('SPAN');
+      expect(vc.builder().firstChild.classList.contains('unspecified')).toBeTruthy();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('SPAN');
 
       // Click on unspecified
-      vc.element().firstChild.firstChild.click();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('UL');
+      vc.builder().firstChild.firstChild.click();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('UL');
 
-      list = vc.element().firstChild.firstChild;
+      list = vc.builder().firstChild.firstChild;
       expect(list.getElementsByTagName("LI")[0].innerText).toEqual('referTo');
       expect(list.getElementsByTagName("LI")[1].innerText).toEqual('d');
       expect(list.getElementsByTagName("LI")[2].innerText).toEqual('e');
@@ -2627,30 +2630,30 @@
 
     it('should be clickable on key', function () {
       // Click on unspecified
-      vc.element().firstChild.firstChild.click();
+      vc.builder().firstChild.firstChild.click();
       // Click on "d"
-      vc.element().firstChild.firstChild.getElementsByTagName("LI")[1].click();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('SPAN');
-      expect(vc.element().firstChild.firstChild.innerText).toEqual('d');
-      expect(vc.element().firstChild.children[1].innerText).toEqual('eq');
-      expect(vc.element().firstChild.children[1].getAttribute('data-type')).toEqual('text');
+      vc.builder().firstChild.firstChild.getElementsByTagName("LI")[1].click();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('SPAN');
+      expect(vc.builder().firstChild.firstChild.innerText).toEqual('d');
+      expect(vc.builder().firstChild.children[1].innerText).toEqual('eq');
+      expect(vc.builder().firstChild.children[1].getAttribute('data-type')).toEqual('text');
       // blur
       document.body.click();
     });
 
     it('should be clickable on operation for text', function () {
       // Click on "d" (or unspecified)
-      vc.element().firstChild.firstChild.click();
+      vc.builder().firstChild.firstChild.click();
 
       // Choose "d"
-      vc.element().firstChild.firstChild.getElementsByTagName("LI")[1].click();
+      vc.builder().firstChild.firstChild.getElementsByTagName("LI")[1].click();
 
       // Click on matchop
-      vc.element().firstChild.children[1].click();
+      vc.builder().firstChild.children[1].click();
 
-      expect(vc.element().firstChild.children[1].tagName).toEqual('UL');
+      expect(vc.builder().firstChild.children[1].tagName).toEqual('UL');
 
-      var ul = vc.element().firstChild.children[1];
+      var ul = vc.builder().firstChild.children[1];
       expect(ul.getElementsByTagName('li')[0].innerText).toEqual("eq");
       expect(ul.getElementsByTagName('li')[1].innerText).toEqual("ne");
       expect(ul.getElementsByTagName('li')[2].innerText).toEqual("contains");
@@ -2659,48 +2662,47 @@
 
       // Choose "contains"
       ul.getElementsByTagName('li')[2].click();
-      expect(vc.element().firstChild.children[1].tagName).toEqual("SPAN");
-      expect(vc.element().firstChild.children[1].innerText).toEqual("contains");
+      expect(vc.builder().firstChild.children[1].tagName).toEqual("SPAN");
+      expect(vc.builder().firstChild.children[1].innerText).toEqual("contains");
       // blur
       document.body.click();
     })
 
     it('should be clickable on operation for string', function () {
       // Click on "d" (or unspecified)
-      vc.element().firstChild.firstChild.click();
+      vc.builder().firstChild.firstChild.click();
 
       // Choose "e"
-      vc.element().firstChild.firstChild.getElementsByTagName("LI")[2].click();
-      
+      vc.builder().firstChild.firstChild.getElementsByTagName("LI")[2].click();
+
       // As a consequence the matchoperator may no longer
       // be valid and needs to be re-evaluated
-      var fc = vc.element().firstChild;
-      
+      var fc = vc.builder().firstChild;
       expect(fc.firstChild.tagName).toEqual('SPAN');
       expect(fc.firstChild.innerText).toEqual('e');
       expect(fc.children[1].innerText).toEqual('eq');
       expect(fc.children[1].getAttribute('data-type')).toEqual('string');
 
-      vc.element().firstChild.children[1].click();
+      vc.builder().firstChild.children[1].click();
 
-      expect(vc.element().firstChild.children[1].tagName).toEqual('UL');
+      expect(vc.builder().firstChild.children[1].tagName).toEqual('UL');
 
-      var ul = vc.element().firstChild.children[1];
+      var ul = vc.builder().firstChild.children[1];
       expect(ul.getElementsByTagName('li')[0].innerText).toEqual("eq");
       expect(ul.getElementsByTagName('li')[1].innerText).toEqual("ne");
       expect(ul.getElementsByTagName('li')[2]).toBeUndefined();
 
       // Choose "ne"
       ul.getElementsByTagName('li')[1].click();
-      expect(vc.element().firstChild.children[1].tagName).toEqual("SPAN");
-      expect(vc.element().firstChild.children[1].innerText).toEqual("ne");
+      expect(vc.builder().firstChild.children[1].tagName).toEqual("SPAN");
+      expect(vc.builder().firstChild.children[1].innerText).toEqual("ne");
 
       // Click on text
-      expect(vc.element().firstChild.children[2].innerText).toEqual("⋯");
-      vc.element().firstChild.children[2].click();
+      expect(vc.builder().firstChild.children[2].innerText).toEqual("⋯");
+      vc.builder().firstChild.children[2].click();
 
       // Blur text element
-      expect(vc.element().firstChild.children[2].firstChild.value).toEqual('');
+      expect(vc.builder().firstChild.children[2].firstChild.value).toEqual('');
 
       // blur
       document.body.click();
@@ -2710,22 +2712,22 @@
 
       // Replay matchop check - so it's guaranteed that "ne" is chosen
       // Click on "e" (or unspecified)
-      vc.element().firstChild.firstChild.click();
+      vc.builder().firstChild.firstChild.click();
       // Rechoose "e"
-      vc.element().firstChild.firstChild.getElementsByTagName("LI")[1].click();
+      vc.builder().firstChild.firstChild.getElementsByTagName("LI")[1].click();
       // Click on matchop
-      vc.element().firstChild.children[1].click();
+      vc.builder().firstChild.children[1].click();
       // Choose "ne"
-      vc.element().firstChild.children[1].getElementsByTagName('li')[1].click();
-      expect(vc.element().firstChild.children[1].innerText).toEqual("ne");
+      vc.builder().firstChild.children[1].getElementsByTagName('li')[1].click();
+      expect(vc.builder().firstChild.children[1].innerText).toEqual("ne");
 
       // Click on "e"
-      vc.element().firstChild.firstChild.click();
+      vc.builder().firstChild.firstChild.click();
       // Choose "f"
-      vc.element().firstChild.firstChild.getElementsByTagName("LI")[3].click();
+      vc.builder().firstChild.firstChild.getElementsByTagName("LI")[3].click();
       
       // The matchoperator should still be "ne" as this is valid for dates as well (now)
-      var fc = vc.element().firstChild;
+      var fc = vc.builder().firstChild;
       expect(fc.firstChild.tagName).toEqual('SPAN');
       expect(fc.firstChild.innerText).toEqual('f');
       expect(fc.children[1].innerText).toEqual('ne');
@@ -2746,7 +2748,7 @@
         "value":"Baum"
       });
      
-      expect(vc.element().firstChild.children[1].getAttribute('data-type')).toEqual('text');
+      expect(vc.builder().firstChild.children[1].getAttribute('data-type')).toEqual('text');
     });
   });
 
@@ -2767,24 +2769,24 @@
         ['b', null],
         ['c', null]
       ]).fromJson();
-      expect(vc.element().firstChild.classList.contains('unspecified')).toBeTruthy();
+      expect(vc.builder().firstChild.classList.contains('unspecified')).toBeTruthy();
 
       // This should open up the menu
-      vc.element().firstChild.firstChild.click();
-      expect(vc.element().firstChild.firstChild.tagName).toEqual('UL');
+      vc.builder().firstChild.firstChild.click();
+      expect(vc.builder().firstChild.firstChild.tagName).toEqual('UL');
 
       KorAP._vcKeyMenu._prefix.clear();
       KorAP._vcKeyMenu._prefix.add('x');
 
-      var prefElement = vc.element().querySelector('span.pref');
+      var prefElement = vc.builder().querySelector('span.pref');
       expect(prefElement.innerText).toEqual('x');
 
       // This should add key 'x' to VC
       prefElement.click();
 
-      expect(vc.element().firstChild.classList.contains('doc')).toBeTruthy();
-      expect(vc.element().firstChild.firstChild.className).toEqual('key');
-      expect(vc.element().firstChild.firstChild.innerText).toEqual('x');
+      expect(vc.builder().firstChild.classList.contains('doc')).toBeTruthy();
+      expect(vc.builder().firstChild.firstChild.className).toEqual('key');
+      expect(vc.builder().firstChild.firstChild.innerText).toEqual('x');
     });
   });
 });
diff --git a/dev/js/src/vc.js b/dev/js/src/vc.js
index 985b64b..35734ad 100644
--- a/dev/js/src/vc.js
+++ b/dev/js/src/vc.js
@@ -146,13 +146,13 @@
 
       var l;
       if (keyList) {
-         l = keyList.slice();
+        l = keyList.slice();
         l.unshift(['referTo', 'ref']);
       }
       else {
         l = [['referTo', 'ref']];
       }
-
+      
       // Create key menu
       KorAP._vcKeyMenu = menuClass.create(l);
       KorAP._vcKeyMenu.limit(6);
@@ -254,9 +254,11 @@
      */
     root : function(obj) {
       if (arguments.length === 1) {
-        var e = this.element();
+        var e = this.builder();
 
         if (e.firstChild !== null) {
+
+          // Object not yet set
           if (e.firstChild !== obj.element()) {
             e.replaceChild(obj.element(), e.firstChild);
           };
@@ -276,12 +278,24 @@
       return this._root;
     },
 
+
+    /**
+     * Get the wrapper element associated with the vc
+     */
+    builder : function () {
+
+      // Initialize if necessary
+      if (this._builder !== undefined)
+        return this._builder;
+
+      this.element();
+      return this._builder;
+    },
+    
     /**
      * Get the element associated with the virtual collection
      */
     element : function() {
-
-      
       if (this._element !== undefined) {
         return this._element;
       };
@@ -289,17 +303,11 @@
       this._element = document.createElement('div');
       this._element.setAttribute('class', 'vc');
 
+      this._builder = this._element.addE('div');
+      this._builder.setAttribute('class', 'builder');
+
       // Initialize root
-      this._element.appendChild(this._root.element());
-      
-      /*
-       * TODO by Helge Hack! additional div, because statistic button is
-       * removed after choosing and/or/x in vc builder. REMOVE this lines
-       * after solving the problem!!!!
-       */
-      this._element.addE('div');
-      this._element.addE('div');
-      this._element.addE('div');
+      this._builder.appendChild(this._root.element());      
       
       // Add panel to display corpus statistic, ...
       this.addVcInfPanel();
diff --git a/dev/js/src/vc/docgroup.js b/dev/js/src/vc/docgroup.js
index d3097e9..7ce2fed 100644
--- a/dev/js/src/vc/docgroup.js
+++ b/dev/js/src/vc/docgroup.js
@@ -13,12 +13,10 @@
 ], function (jsonldClass,
 	           unspecClass,
 	           docClass,
-            docGroupRefClass) {
+             docGroupRefClass) {
 
   const _validGroupOpRE = new RegExp("^(?:and|or)$");
 
-  const loc = KorAP.Locale;
-
   const docGroupClass = {
     _ldType : "docGroup",
 
diff --git a/dev/scss/header/statistics.scss b/dev/scss/header/statistics.scss
index 44d8930..a4d3f1e 100644
--- a/dev/scss/header/statistics.scss
+++ b/dev/scss/header/statistics.scss
@@ -1,41 +1,10 @@
 @charset "utf-8";
 @import "../util";
 
-/*
-div.view.vcstatistic {
-	position: relative;  
-	display: inline-flex;
-	width: auto;
-}
-*/
-
 div.stattable {
 	display: flex;
 	flex-direction: row;
 }
-/*
-div.stattable ul.action.image {
-  display: block;
-  li {
-    cursor: pointer;
-    color: $nearly-white;
-    text-decoration: none;
-    > span {
-      @include blind;
-    }
-    border-width: 0;
-    // z-index: 8;
-    text-decoration:none;
-    text-align: center;
-    font-style: normal;
-  
-    &.close::after {
-	    font-family: 'FontAwesome';
-	    content: $fa-close;
-    }
-  }
-}
-*/
 
 div.stattable > dl {
   display: flex;
@@ -45,21 +14,9 @@
   margin-bottom:4px;
   padding-bottom: 1px;   
   > div {
-    /*
-    display: flex;
-    margin-right: 5px;
- 	  margin-left: 5px;
-    > * {
-      @include cell-info;
-    }
-   */
     border-color: $dark-green;
     > dt {
       background-color: $middle-green;
-      /*
-      text-align: right;
-      // padding: 1px;
-     */
       width: 15em;
       margin: 0;
       &:after {
@@ -67,15 +24,6 @@
   	  }
     }
    	> dd {
-   	  /*
-   	  text-align: left;
-      // padding: 1px;
-      margin: 0;
-      width: 100%;
-      max-width: none;
-      max-height: 6em;
-      margin-left: $border-size;
-     */
       background-color: $lightest-green;
       color: $dark-grey;
 	  }
diff --git a/dev/scss/header/vc.scss b/dev/scss/header/vc.scss
index 1d0cd0e..eeea883 100644
--- a/dev/scss/header/vc.scss
+++ b/dev/scss/header/vc.scss
@@ -9,7 +9,7 @@
  * Virtual Collection Builder
  */
 
-.vc {
+.vc .builder {
   margin-top: 4pt;
 
   .docGroup, .doc {
@@ -73,34 +73,6 @@
         // This will be overruled by JS!
         content: "or";
       }
-
-      /*
-      &:after {
-        .button-stat {
-	        > span {
-            cursor: pointer;
-            box-shadow: $choose-box-shadow;
-            font-size: 9pt;
-            line-height: 1.5em;
-            padding: 0 4px;
-            display: inline-block;
-            @include choose-item;
-            border-style: solid;
-            border-width: $border-size 0;
-            &:hover {
-	            @include choose-hover;
-            }
-            &:first-child {
-	            border: {
-	            left-width: $border-size;
-	            right-width: $border-size;
-	          }
-            }
-            
-          }
-        }
-     	}
-     */
     }
 
     // And operation
@@ -366,20 +338,4 @@
 div.panel.vcinfo {
   padding: 3pt 0pt 3pt 3pt;
   background-color: $dark-green;
-  /*
-  div.button-group {
-    display: inline-block;
-    margin-right: .5em;
-    > span {
-      position: relative;
-      box-shadow: none;
-    }
-  }
-*/
 }
-
-/*
-.button-group.vcstatistic{
-	position:relative;
-	}
-*/
\ No newline at end of file
