Style fixes.

* Avoid anonymous classes
* Fix spellings
* Remove nesting.