Update with optimized unit tests and new bit operations