diff --git a/src/head-support/head-support.js b/src/head-support/head-support.js
index 67cfc69..3ed7ecc 100644
--- a/src/head-support/head-support.js
+++ b/src/head-support/head-support.js
@@ -3,139 +3,162 @@
//
// An extension to htmx 1.0 to add head tag merging.
//==========================================================
-(function(){
-
- var api = null;
-
- function log() {
- //console.log(arguments);
- }
-
- function mergeHead(newContent, defaultMergeStrategy) {
-
- if (newContent && newContent.indexOf('
-1) {
- const htmlDoc = document.createElement("html");
- // remove svgs to avoid conflicts
- var contentWithSvgsRemoved = newContent.replace(/