Some changes to code documentation:

used @slot tag in class definition
used \linkS4class for links to classes
added a few more @param tags
took out an unwanted ... parameter
added a few more code comments
fixed some typos
wrapped some very long comments