emacs -nw as EDITOR, other cleanup