Minor improvements to epistemic code; implementing parent in TreeNode