Added Vertex indexing for saving memory