Erasing vertices is now O(1) by storing the index