Add comments to clarify the "endArgs" logic