diff --git a/index.html b/index.html
index 83334ac402d86c426d91a2b84a9988dfd6fc9c21..ad6337906bc2608d96d8edc65d7cd2c9e399d75e 100644
--- a/index.html
+++ b/index.html
@@ -43,7 +43,7 @@
     <script>
         window.CHATTERBOX_CONFIG_LOCATION = "./config.json";
     </script>
-    <script src="./src/parent.ts" type="module" id="chatterbox-script"></script>
+    <script src="./src/parent/parent.ts" type="module" id="chatterbox-script"></script>
 </body>
 
 </html>
diff --git a/src/parent-style.css b/src/parent/parent-style.css
similarity index 75%
rename from src/parent-style.css
rename to src/parent/parent-style.css
index 7dfe7077144711f3c99bae7fbbc739fb2892c747..a6eaa88954bde09942c8136bfc8c26a8a77fed01 100644
--- a/src/parent-style.css
+++ b/src/parent/parent-style.css
@@ -32,10 +32,10 @@
     border: none;
     border-radius: 100%;
     cursor: pointer;
-    background: no-repeat center url('./ui/res/chat-bubbles.svg'), linear-gradient(180deg, #7657F2 0%, #5C56F5 100%);
+    background: no-repeat center url('../ui/res/chat-bubbles.svg'), linear-gradient(180deg, #7657F2 0%, #5C56F5 100%);
     box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1), 0px 12px 32px -2px rgba(0, 0, 0, 0.2);
 }
 
 .start-background-minimized {
-    background: no-repeat center url("./ui/res/chevron-down-button.svg"), linear-gradient(180deg, #7657F2 0%, #5C56F5 100%);
+    background: no-repeat center url("../ui/res/chevron-down-button.svg"), linear-gradient(180deg, #7657F2 0%, #5C56F5 100%);
 }
diff --git a/src/parent.ts b/src/parent/parent.ts
similarity index 96%
rename from src/parent.ts
rename to src/parent/parent.ts
index 208267a72b40a1a3174ecb72f5694db46a8e7700..8ca6dbbfb699788f68ee19c4f7ebff47c9f747ff 100644
--- a/src/parent.ts
+++ b/src/parent/parent.ts
@@ -2,8 +2,7 @@ import "./parent-style.css";
 
 let isIframeLoaded = false;
 const parentHostRoot = (document.querySelector("#chatterbox-script") as HTMLScriptElement).src;
-const parentHosRootURL = new URL(parentHostRoot);
-const hostRoot = `${parentHosRootURL.protocol}${parentHosRootURL.host}`;
+const hostRoot = new URL(parentHostRoot).origin;
 
 const sizeCollection = {
     "desktop": {