Routing no longer depends on the order that routes are added

Closes #397