Tree update and clean up.