Refactor pprint funcs into class to allow formatting customization