Move setup() into main control flow
Wrap all functions into a class
Replace global variables with instance variables
Adhere to PEP8 module name guideline