Adding fringe management to perform best-first search.