Adopt code style
Improve documentation for hasVertex()
Add unit tests for hasVertex()