Convert all externally loaded scripts to use a common script loading code.