Moved ncurses code to Editor class.