CMakeLists.txt: added corrected NCKS define so now works on Ubuntu machines
Corrected all comments to be correct and now aligned with algorithms and
implementations.
Minor corrections to algorithms within a few files.