Code cleanup: make easier to debug.

* Split variable assignment.
* Always use multi-line blocks.
* Always use block form of `if`.
Merge pull request #9506 from rwjblue/split-var-declarations

Make things easier to debug.