Remove duplicated code when adding arguments.

Tests pass successfully.