Significantly improved the routing algorithm.