Reduced indentation levels, broke long lines

Also removed some unneeded else blocks to ensure more consistent return values.

Change-Id: Icf1d6fecfbd512fadad61442c968f0ef1ba30a88