Improved documentation.

Wrote up a passing explanation of how it works.