Refactor emacs, add custom function to split window.