tree cleanup improvements