Ncurses support, changed build system a little