lots of formatting/whitespace fixes