New file to hold big tree functions