reformatting code for readability

- Word-wrapping closer to around 80 chars
- Splitting overlong comments and moving to line above code.
- Cleaning whitespace.