Unreachable code path panic change
Improved comments. Fixed special case documentation of the public comment, and added better documentation to the working
of the algorithm