Changes API to do less things in the tree walker constructor