Extract fetch_script out of ScriptInterpreter