Avoid dependency on global document.
Switch to using vtree/interface