cleanup tree nodes