Code cleanup: make easier to debug.

* Split variable assignment.
* Always use multi-line blocks.
* Always use block form of `if`.