diff --git a/dev/js/spec/buttongroupSpec.js b/dev/js/spec/buttongroupSpec.js
index fa5a888..1e27d96 100644
--- a/dev/js/spec/buttongroupSpec.js
+++ b/dev/js/spec/buttongroupSpec.js
@@ -35,6 +35,40 @@
       expect(btn.innerText).toEqual('Meta');
     });
 
+    it('should be clearable', function () {
+      var group = buttonGroupClass.create();
+      expect(group.element().classList.contains('button-group')).toBeTruthy();
+
+      group.add('Meta', ['meta', 'top'], function (e) {});
+      group.add('Mate', ['mate'], function (e) {});
+
+      var btn = group.element().children[0];
+      expect(btn.tagName).toEqual('SPAN');
+      expect(btn.classList.contains('meta')).toBeTruthy();
+      expect(btn.classList.contains('top')).toBeTruthy();
+      expect(btn.innerText).toEqual('Meta');
+
+      btn = group.element().children[1];
+      expect(btn.tagName).toEqual('SPAN');
+      expect(btn.classList.contains('mate')).toBeTruthy();
+      expect(btn.classList.contains('top')).toBeFalsy();
+      expect(btn.innerText).toEqual('Mate');
+
+      // clear button
+      group.clear();
+
+      expect(group.element().children.length).toEqual(0);
+
+      group.add('New', ['new'], function (e) {});
+
+      btn = group.element().children[0];
+      expect(btn.tagName).toEqual('SPAN');
+      expect(btn.classList.contains('new')).toBeTruthy();
+      expect(btn.classList.contains('top')).toBeFalsy();
+      expect(btn.innerText).toEqual('New');
+    });
+
+    
     it('should listen to button clicks', function () {
       var group = buttonGroupClass.create();
 
diff --git a/dev/js/spec/matchSpec.js b/dev/js/spec/matchSpec.js
index 5a4111b..b09a7cb 100644
--- a/dev/js/spec/matchSpec.js
+++ b/dev/js/spec/matchSpec.js
@@ -350,7 +350,8 @@
       expect(e.classList.contains('active')).toBe(true);
       expect(e["_match"]).not.toBe(undefined);
 
-      actions = e.querySelector("p.ref > div.action.bottom").getElementsByTagName("span");
+      actions = e.querySelector("p.ref > div.action.bottom").children;
+      
       expect(actions[0].getAttribute("class")).toEqual("meta");
       expect(actions[1].getAttribute("class")).toEqual("info");
       expect(actions[2].getAttribute("class")).toEqual("tree");
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 482d384..66183f4 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -30,15 +30,15 @@
   };
 
   function _andOn (obj) {
-    KorAP._and.bind(obj.element().lastChild.firstChild).apply();
+    KorAP._and.apply(obj);
   };
 
   function _orOn (obj) {
-    KorAP._or.bind(obj.element().lastChild.firstChild).apply();
+    KorAP._or.apply(obj);
   };
 
   function _delOn (obj) {
-    KorAP._delete.bind(obj.element().lastChild.firstChild).apply();
+    KorAP._delete.apply(obj);
   };
 
   var demoFactory = buildFactory(vcClass, {
@@ -566,7 +566,7 @@
       expect(docElement.lastChild.children.length).toEqual(0);
     });
 
-    it('should be removable, when no root', function () {
+    it('should be removable, when no root', function () {    
       var docGroup = docGroupClass.create();
       docGroup.operation('or');
       expect(docGroup.operation()).toEqual('or');
@@ -582,6 +582,9 @@
       // Add unspecified object
       docGroup.append();
 
+      var parent = document.createElement('div');
+      parent.appendChild(docGroup.element());
+
       expect(docGroup.element().getAttribute('class')).toEqual('docGroup');
       expect(docGroup.element().children[0].getAttribute('class')).toEqual('doc');
 
@@ -593,6 +596,7 @@
       expect(unspec.lastChild.children[0].getAttribute('class')).toEqual('delete');
     });
 
+    
     it('should be replaceable by a doc', function () {
       var doc = unspecifiedClass.create();
       expect(doc.ldType()).toEqual("non");
@@ -1141,15 +1145,15 @@
         '(Titel = "Baum" & Veröffentlichungsort = "hihi" & ' +
           '(Titel = "Baum" | Veröffentlichungsort = "hihi")) ' +
           '| Untertitel ~ "huhu"');
-      expect(vc.root().element().lastChild.children[0].firstChild.nodeValue).toEqual('and');
-      expect(vc.root().element().lastChild.children[1].firstChild.nodeValue).toEqual('×');
+      expect(vc.root().element().lastChild.children[0].innerText).toEqual('and');      
+      expect(vc.root().element().lastChild.children[1].innerText).toEqual('×');
       expect(vc.root().delOperand(vc.root().getOperand(0)).update()).not.toBeUndefined();
       expect(vc.toQuery()).toEqual('Untertitel ~ "huhu"');
 
       var lc = vc.root().element().lastChild;
-      expect(lc.children[0].firstChild.nodeValue).toEqual('and');
-      expect(lc.children[1].firstChild.nodeValue).toEqual('or');
-      expect(lc.children[2].firstChild.nodeValue).toEqual('×');
+      expect(lc.children[0].innerText).toEqual('and');
+      expect(lc.children[1].innerText).toEqual('or');
+      expect(lc.children[2].innerText).toEqual('×');
 
       // Clean everything
       vc.clean();
@@ -1230,23 +1234,22 @@
       expect(op.or()).toBeTruthy();
       expect(op.del()).toBeTruthy();
 
-      var e = op.element();
+      var e = op.update();
       expect(e.getAttribute('class')).toEqual('operators button-group');
       expect(e.children[0].getAttribute('class')).toEqual('or');
-      expect(e.children[0].firstChild.data).toEqual('or');
+      expect(e.children[0].innerText).toEqual('or');
       expect(e.children[1].getAttribute('class')).toEqual('delete');
-      expect(e.children[1].firstChild.data).toEqual('×');
+      expect(e.children[1].innerText).toEqual('×');
 
       op.and(true);
       op.del(false);
-      op.update();
+      e = op.update();
 
-      e = op.element();
       expect(e.getAttribute('class')).toEqual('operators button-group');
       expect(e.children[0].getAttribute('class')).toEqual('and');
-      expect(e.children[0].firstChild.data).toEqual('and');
+      expect(e.children[0].innerText).toEqual('and');
       expect(e.children[1].getAttribute('class')).toEqual('or');
-      expect(e.children[1].firstChild.data).toEqual('or');
+      expect(e.children[1].innerText).toEqual('or');
     });
   });
 
