refactor treebank reading. closes #35