Add Appel's tree.* and temp.* classes.

Also fix the ugly coding style he used.