Refactoring PrettyPrinter