refactor the routing file to use a lodash `each` function instead of a native "for"
loop.  The reason this is important is that the scoping makes a lot more sense, e.g.
we have unique variables for each iteration of the loop, instead of one variable.