(maint) Use lambdas to clean up writing logic
(maint) Resolve facts before printing to avoid interleaving debug output
Merge pull request #180 from MikaelSmith/maint/master/refactor-pretty-printers

(maint) Refactor pretty printers, fix debug interleaving