Changed all printf's to printw, as ncurses likes it(excluding those printfs not being used in ncurses).
Set the return code to 1 when there is an error.
Added a message on exit pointing to the original source on github.