Switched to the closed_set for keeping track of completed coordinates.