Add Vertex class and VertexFactory class