Finished commenting code.  Improved testing algorithms.