Implemented logic for delete and update element and added tests.