- Reimplemented test-then-if optimization
- Changed genBranch to use delegate