Fix code cleanup

Some code cleanups, to make code more consistent.

Based on the source files, I inferred that spaces are used for indentation, since only a few files used tab.
Is there a project wise specification for max line width ?