Refactored the top-down kernel of the stepwise BFS algorithm to avoid blocking