Preparation for A* path finding.