Revert "Revert "Handling edit and delete""

This reverts commit b63dc0baf01533c41fc1bc72bc962cdb61842725.