Refactoring and add command to cleanup Emacs directory