Right now, the instances of Router implement routing itself, and they are starting to become complex. The routing mechanisms should be separated out into a more general thing that can be tested by itself. The instances of Router (which would perhaps need to be renamed) should only build up the router structure, and then the router would be run as its own thing.