fixing readline issue #205
ncurses fix
major PP fixes, also fixing issue #186