Mixing different binary boolean operators within an expression
without using parentheses to clarify precedence is not allowed (T358966)
Change-Id: I4348e05d74bdfd1e076c8b0425fe65616143e8f7
E.g. reducing deep indention and code duplication. Removing comments
that literally repeat what the code says.
The goal is to make the code easier to read and to maintain in the
future. I hope this is the case.
Change-Id: I6f23bc61ffb8b6d42ec697fec91bb6c92152561f