Order nodes when getting subtree to make sure that only two passes are necessary to get all parent-child relationships.
Removing dependency on librdf.