Apparently this is how it's done.
Refactored, removed GNU readline dependency.
Separate library to make reuse easier.
Cleaner Makefile.