Use logical operators for boolean expressions

This is mainly the "correct" way of doing that operators.
Possible adventages desribed here:
http://stackoverflow.com/questions/24542/using-bitwise-operators-for-booleans-in-c

No functional changes.