Build static library in bin/ directory and install to %PREFIX/lib
Allow unit testing without ncurses.
Improve memory handling.