ENH: Changed the test cases and added comments.

Consolidated the test cases into one that runs much faster.
Added comments around my use of zip() in algorithm.py.