Added better support for A* search