Added curses-based version.