Move NOMAD escape handling into DLL