Added some preliminary support for trees and chains and things