Fixed Graph class, re-thinking mergeVertices func