Script and ESM changes