Debugging related changes
Update vertex finding with improved efficiency