Fixed the remaining problems with tree ser/deser, all unit tests now pass (plus added couple of new ones)

6 files changed