Implement delete operation with tests.