Add getLinks() and addLink() methods for the Graph class.