stabilized tests.
Refactored path finding.