Simplify & optimize branch handling.