Correctly generate the lsit of routes