Fix example with deprecated env var.
Unused import + old environment variable.
PEP8.
Be a bit more careful about os.environ keys.