Un-nest some sections of code

Reversing the logic in a few of the booleans and returning earlier
allows us to not have to be nested quite so deep.

Change-Id: Ia0dad183563381e9eb8c790ba61d0b350d74421d
Merge "Un-nest some sections of code"