Huge optimization in _exploreBranch method using BFS.