Working

Fixed some broken data, which caused problems
earlier.

Cleaned up the code in algorithms::

Comments up to date