Bugs and standards improvements.
* Actual bug: Fixed undefined variable failure_string in def
    setup_globals.
* Actual bug: Fixed undefined variable unpickle_return_code in def
    quick_unpickle.
* Put in dummy code to satisfy incorrect undefined warnings by pyflakes.
* Removed a number of undefined variables.
* Removed variables that were not uesd.