Added the join function, as well as tests for Dijkstra.