Bring back vertices sorting & cleanup a bit