Improved comments.
Tested shortest path algorithm and fixed bugs discovered by tests.