Tree class nearly done.