Added clean way to exit (/q)

calling endwin() to exit curses then exit() to exit