Added last docstrings and message counter for all three algorithms.
completed test with linegraphs.