Fixed bugs in the reading of the adjacency matrix which has fixed the main bugs. Now need to verify the science. I think I need to change [kk][ii] as well as [ii][kk]