Test for existing vertex.
Adopt code style
Improve documentation for hasVertex()
Add unit tests for hasVertex()