Revert "Improve delete handling code."

This reverts commit 62e23e13a3ffe9dff2ec1898e4d3261b6773d62a.