Added some notes to the code. Patch in comment 6.