Fix AStar
Refactor export mechanism.