Add save methods to trees.