Well this should add some tree function support

It doesn't actually work properly, so I must have cocked up.
Also mental note, write about the typo's in webvs that break some of the
functions that I call.