Improve comments, add a hasEdge method.