Make the source code more pretty

Minor change to align source code structure to be internally
consistent.

* Remove trailing whitespaces
* Use tabs everywhere
* Align definitions