Add duplicate vertex checking