Fixes "variable name is shadowed" warnings
Fixes several typos.