Very simple tree builder implemented