Handle runtime errors in editrun

Additionally: some minor interface changes