Added generics to the route iterator.