You know this code far better than I do.  I'll wait for this pull request to get resolved, then go ahead and submit my own small one.

cc9cii had a point about different algorithms for pathfinding.  That seems the perfect spot to implement the strategy pattern.  I'll bow down to everyone's expertise.