Merged tree functions.