Fix lots of formatting bugs