Revised the graph linked list implementation