Pushing broken code
Updated code
Finally fixed memory leak issues with ncurses.