Getting bitwise operations in place, close to completion