Cleanup.
Cleanup.
Optimize IsBorderVertex.