Clean up and refactor emacs config.