lots of formatting fixes