Code: Reduces block nesting.
Other minor improvements.