astar code improvements. fear the kraken