More serialization/unserialization modifications to the tree viewer. UIDs are only assigned when necessary/not present, and persist through copy construction.