Massive code reformat.

Used a code formatting tool to make the code more readable.