Implement logic behind delete button.