Made tree_builder

This will let it be possible to customize how trees are built