Trees: added various infrastructure pieces for trees (serialization, visualization)