Add mostly working RTree test code