Whitespace cleanup.

Remove trailing spaces and use 4 spaces consistently for indentation.
Merge pull request #431 from XhmikosR/whitespace

Whitespace cleanup.