Corrected some tests, updated Dijkstra algorithm a little