Created a Setup class to hold what used to be global settings so that we have one object to interact with, edited rest of code to use this object. Replaced os.Popen with subprocess.Popen as the former was deprecated in Python-2.6.  Untested commit used as placeholder