Code cleanup: make easier to debug.

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