just a bit more commenting and some code cleanup.  I still need to fix the wrapping edge-case.