Replaced several bitwise OR with logical OR

Throughout the code bitwise OR operators were used for logical test. A side effect of this was a lot of compiler warnings (VC).