Fixed documentation.

Took into account the code review, by changing some comments and renaming two parameters.