included comments, corrected parameter check

The parameter length is checked correctly.
Comments are also reused and generated, downside: they must exist in the source file.