[ref] Extract and promisify build-tree method (WIP)