Replaced more bitwise operations with the method ones