There was a typo in the HasVertex()
Prims is half working...needs debugged to figure out what is wrong.