Change some things in the A* algorithm