Refine the router and map