Rework prettyprinting API for internal representation.