Cleanup: added some Javadocs, added a project doc on how the algorithm
works, and improved some variable names.
Improved unit test names and fixed the param ordering in the assertions.