Add curses startup and reset to the main function