Cleaned up global vars, linting.

Hi, these commits clean up mixed spaces and tabs, and more importantly fix a couple of globally-defined variables.  Fixes issue #9.