Split env_run into proc_startcore, early work