combine remove reference and remove subtree