Tree routing

There are some breaking changes, but from some degree they make sense.