Implement Graph class and nodes, edges methods