diff --git a/InstaProvision.xaml b/layout.xaml
similarity index 94%
rename from InstaProvision.xaml
rename to layout.xaml
index 0e70e7f..8fdd125 100644
--- a/InstaProvision.xaml
+++ b/layout.xaml
@@ -1,6 +1,6 @@
-
+
@@ -119,7 +119,7 @@
-
+
diff --git a/main.ps1 b/main.ps1
index bf67ff8..711de23 100644
--- a/main.ps1
+++ b/main.ps1
@@ -14,9 +14,35 @@ Import-Module MSAL.PS
Write-Host "[INFO] MSAL.PS module loaded."
# Load config and tool modules
-. "$PSScriptRoot\config.ps1"
-. "$PSScriptRoot\tools\autotask.ps1"
-. "$PSScriptRoot\tools\dattormm.ps1"
+$urls = @{
+ autotask = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/tools/autotask.ps1"
+ datto = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/tools/dattormm.ps1"
+ config = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/config.ps1"
+}
+
+$xamlUrl = "https://git.svstools.com/cpayne/InstaClientPS/raw/branch/main/layout.xaml"
+
+try {
+ $xamlContent = Invoke-WebRequest -Uri $xamlUrl -UseBasicParsing -ErrorAction Stop
+ [xml]$xaml = $xamlContent.Content
+ Write-Host "[INFO] XAML loaded from remote URL."
+} catch {
+ Write-Host ("[ERROR] Failed to load XAML from {0}: {1}" -f $xamlUrl, $_.Exception.Message)
+ exit 1
+}
+
+
+foreach ($name in $urls.Keys) {
+ try {
+ $scriptText = Invoke-WebRequest -Uri $urls[$name] -UseBasicParsing
+ Invoke-Expression $scriptText.Content
+ Write-Host "[INFO] Loaded $name.ps1 from URL."
+ } catch {
+ Write-Host "[ERROR] Failed to load $name.ps1: $($_.Exception.Message)"
+ exit 1
+ }
+}
+
Write-Host "[INFO] Config and tool modules loaded."
# Load WPF assemblies