Changed the deleting functionality so that items are deleted when a delete button is clicked, instead of when the item itself is clicked.