Cleaner code

Using `document.head` instead of `document.getElementsByTagName()`, and using `.remove()` instead of `.parentNode.removeChild()`. Both are supported on IE9.