Added endwin function to return terminal to normal at end of program