Fixed delete to not use index as it doesn't work for sorted lists. This removes the html that was rendered as well.