fix tests and integrate tree-bundle