Checking whether parentNode is null is cheaper than unconditionally calling appendChild, see http://jsperf.com/check-parentnode-before-appendchild.

`.remove()` is not yet supported by IE, and the existing solution works just as fine, so I've stayed with `parentNode.removeChild(child)`. If you prefer `.remove`, then I will add `Element.prototype.remove` to compatibility.js and amend the code again.

I've updated the commit, all inline styles are now located in viewer.css.