More work on trees and stuff