Whitespace and code style consistency fixes using the astyle tool

Hello,

I have performed another round of whitespace and code style consistency fixes using the astyle tool. I think it makes the code much easier to read.

Would be good if there was a way of verifying Pull Requests before they are merged.

nick.