BFSTree is now generated by layers