Change toAdjacencyList() to new adjacency list style