Some PEP8 stuff and a shadowed internal name.
Added quantities to requirements.
PEP8 corrections.