Simplified printing, made it more efficient, and made it work better on non-TTY outputs.