Refactored delete button - able to delete a note or a group