Updated scriptLoader