Use 2D locations (on a torus) for routing + generate a 2D routing map
Small optimization and fixes for building optimized