I have now completely overhauled the original pretty printer with a much cleaner, simpler, more effective design. There are still visible bugs, but I have more control over the output now, and things are starting to look much closer to how I had originally envisioned it.