Extract scripts to external source