Refactor pretty-printing out into its own namespace.