Finished tree building v2