pep-8 fix
removing shadowing and unresolved references