Fix bugs in usage of Format module special characters

The format module assumes:
1. All output is within a box
2. Newlines are printed using `@\n` not `\n`

This patch fixes bugs in the front-end that did not conform to these assumptions and led to weird and confusing wraps in pretty-printed output.