Break out arg name extraction logic into separate function.