Added A* worker code.