move envvars to cmdline args also; refactor for pep8,pylint
pylint fixes