cleanup and improved example to demonstrate the fix
Merge branch 'robustness'
improved demo to demonstrate replacing tree data