prettyprint: cleanup duplicate code.