Cleanup.  Small refactor of pretty_print(), remove some useless code

pretty_print() had some redundant functionality that was bothering me.
Refactored.

Some old variables in lib.m were hanging around unused.  Removed them.