Router implementation.