Refactor fillVertex()