Implemented delete mode and tests.