Simple Implementation of the graph data structure