diff --git a/public/js/spec/vcSpec.js b/public/js/spec/vcSpec.js
index 32a018f..4ac18a8 100644
--- a/public/js/spec/vcSpec.js
+++ b/public/js/spec/vcSpec.js
@@ -1421,7 +1421,57 @@
     expect(fc.lastChild.getAttribute('class')).toEqual('operators');
   });
 
-  // Todo: wrap on root!!
+  it ('should wrap on group (case "and")', function () {
+    var vc = complexVCFactory.create();
+
+    // Wrap with direct element access
+    expect(vc.toQuery()).toEqual(
+      'pubDate in 2014-12-05 & (title = "Hello World!" | foo = "bar")'
+    );
+
+    // Add unspecified
+    KorAP._and.bind(vc.root().getOperand(1).element().lastChild.firstChild).apply();
+    expect(vc.toQuery()).toEqual(
+      'pubDate in 2014-12-05 & (title = "Hello World!" | foo = "bar")'
+    );
+    expect(vc.root().ldType()).toEqual('docGroup');
+    expect(vc.root().getOperand(1).ldType()).toEqual('docGroup');
+    expect(vc.root().getOperand(1).operation()).toEqual('and');
+/*
+    expect(vc.root().operation()).toEqual('and');
+*/
+  });
+
+/*
+  it ('should wrap on root', function () {
+    var vc = KorAP.VirtualCollection.render(
+      {
+	"@type": 'korap:docGroup',
+	'operation' : 'operation:and',
+	'operands' : [
+	  {
+	    "@type": 'korap:doc',
+	    "key": 'pubDate',
+	    "match": 'match:eq',
+	    "value": '2014-12-05',
+	    "type": 'type:date'
+	  },
+	  {
+	    "@type" : 'korap:doc',
+	    'key' : 'foo',
+	    'value' : 'bar'
+	  }
+	]
+      }
+    );
+
+    // Delete with direct element access
+    expect(vc.toQuery()).toEqual('pubDate in 2014-12-05 & foo = "bar"');
+    KorAP._or.bind(vc.root().element().lastChild.lastChild).apply();
+    expect(vc.root().ldType()).toEqual('docGroup');
+    expect(vc.root().operation()).toEqual('or');
+  });
+*/
 });
 
 /*
diff --git a/public/js/src/vc.js b/public/js/src/vc.js
index 09d20ea..d9cde4e 100644
--- a/public/js/src/vc.js
+++ b/public/js/src/vc.js
@@ -59,17 +59,28 @@
   // Add doc
   KorAP._add = function (obj, type) {
     var ref = obj.parentNode.refTo;
+    var parent = ref.parent();
     if (ref.ldType() === 'docGroup') {
-      console.log('~~~~~~~~~');
-    }
-    else if (ref.ldType() === 'doc') {
-      var parent = ref.parent();
-// Todo: Check if parent is a group
-      if (parent.operation() === type) {
-	  parent.newAfter(ref);
+
+      // Check that the action differs from the type
+      if (ref.operation() === type)
+	return;
+
+      if (parent.ldType() !== null) {
+	return parent.newAfter(ref);
       }
       else {
-	ref.wrap(type);
+	// The group is on root - wrap
+	return ref.wrapOnRoot();
+      };
+    }
+    else if (ref.ldType() === 'doc') {
+// Todo: Check if parent is a group
+      if (parent.operation() === type) {
+	return parent.newAfter(ref);
+      }
+      else {
+	return ref.wrap(type);
       };
     };
   };
@@ -148,8 +159,11 @@
       if (arguments.length === 1) {
 	var e = this.element();
 	if (e.firstChild !== null) {
-	  if (e.firstChild !== obj.element())
+	  console.log(e.firstChild);
+	  if (e.firstChild !== obj.element()) {
+console.log(e.firstChild);
 	    e.replaceChild(obj.element(), e.firstChild);
+	  };
 	}
 
 	// Append root element
@@ -714,6 +728,22 @@
       };
     },
 
+    // Wrap a new operation around the root group element 
+    wrapOnRoot : function () {
+      var parent = this.parent();
+
+      var group = KorAP.DocGroup.create(parent);
+      group.operation(
+	this.operation() === 'and' ? 'or' : 'and'
+      );
+      group.append(this);
+      this.parent(group);
+      group.append();
+      group.element(); // Init (seems to be necessary)
+      parent.root(group);
+      return this.parent();
+    },
+
     update : function () {
       // There is only one operand in group
       if (this._operands.length === 1) {
