Mesh altered

Mesh is again distance-based, but does take into account the extra turns
necessary from the starting position. This approach seems to lead to the
best path planning under the current computation time constraints.