Fixes to printTree, and minor changes to plotTree and expandTree.