finishing refactoring Vertex class