Dijkstra's working; more extensive testing necessary, code cleanup required; Pred function may need debugging.