Got rid of all the curses stuff, reverting to the simpler state. Some
cleanup as well.
More refactoring and cleanup. Added an example runner and tests.