Refactored update vertices