Use full names for variables

Use full names for variables everywhere for better readability.

No functional change.
idx is idiomatic in C/C++