Improve selecting all and selecting none in document deletion