Tree update + main