Refactoring code base according to new formatting rules.

In order to standardize the style of the code, we introduce formatting and
checkstyle tools (see utils/README.md for more information). The entire codebase
has been refactored to conform to these standards.