restructure how MessageTree's structure is assembled