Minor improvements of bit shifting process