Comments and minor changes.

Added comments to algorithm source files.