witespace fixes and formatting cleanup