Updated some functions because they were broken when testing the algorithm. Algorithm now works with the test graph, should be tested with other graphs of known paths.