I have no idea how my email address has been wrong for two years.  lol
Move handle_keys and friends into it's own file, for the library.
Oops, typo.
Make the border data static.
Added dumbsh, a really really dumb shell, for demonstration.

Yes, I know, it's still broken.