Little refactoring
Changed adjacency_list to adjacency_matrix