Making changes necessary for A* to work.