Can we put these extractors into `TreeInfo`? Or maybe there's already some stuff there along these lines?