Add log likelihoood computation in TreeNode to support inference. Refactor and mark _Corpus as a private class.