Fixed some formatting and other code smells in the tests.
Added some comments and whitespace.