cleanup and switch to emacs