More general formatting.

I'm still not 100% happy with this though...