API for trees library.