For the stepwise BFS algorithm, reorganized the frontier update, and added a better static swapping strategy.