/**  @author Gilles Coomans <gilles.coomans@gmail.com> */
/**
 * Pure Virtual Node
 */
function PureNode() {
	this.__yPureNode__ = true;
}

PureNode.prototype  = {
	insertBefore: function(toInsert, o) {
		if (!this.childNodes)
			return false;
		var index = this.childNodes.indexOf(o);
		if (index == -1)
			return false;
		if (index == 0)
			this.childNodes.unshift(toInsert);
		else
			this.childNodes.splice(index, 0, toInsert);
		return true;
	},
	appendChild: function(child) {
		this.childNodes = this.childNodes || [];
		this.childNodes.push(child);
		child.parentNode = this;
		return child;
	},
	removeChild: function(child) {
		if (!this.childNodes)
			return false;
		for (var i = 0, len = this.childNodes.length; i < len; ++i)
			if (this.childNodes[i] === child) {
				child.parentNode = null;
				this.childNodes.splice(i, 1);
				return child;
			}
		return false;
	},
	toString: function() {
		if (!this.childNodes)
			return '';
		var out = '';
		for (var j = 0, len = this.childNodes.length; j < len; ++j)
			out += this.childNodes[j].toString();
		return out;
	}
};

module.exports = PureNode;

@@ -195,32 +195,41 @@
 rt, o) %7B%0A%09%09if (!
+o) %7B%0A%09%09%09(
 this.childNodes)
@@ -227,33 +227,164 @@
 ildNodes
-)%0A%09%09%09return false
+ = this.childNodes %7C%7C %5B%5D).push(toInsert);%0A%09%09%09return toInsert;%0A%09%09%7D%0A%09%09if (!this.childNodes)%0A%09%09%09throw new Error('node was not found : ' + o.toString())
 ;%0A%09%09var 
@@ -437,36 +437,79 @@
 x == -1)%0A%09%09%09
-return false
+throw new Error('node was not found : ' + o.toString())
 ;%0A%09%09if (inde
@@ -618,19 +618,23 @@
 return t
-rue
+oInsert
 ;%0A%09%7D,%0A%09a

correct PureNode insertBefore