Refactor out exec-editor function.