Implemented evaluation for more complex trees, and added a few basic
corresponding tests. However, this testing is far from thorough, and
should be expanded.