Fix variable shadowing warnings.
Merge pull request #183 from gardenm/variable_shadowing_fix

Fix variable shadowing warnings.