Refactored the delete button