Fix silly indexOfClosest bug. Rerouting works! Now just to deal with edge cases.