Fix pathfinding, and simplify classpath.