Move curses code into class