minor code changes for pep8 and getting rid of unused packages/module imports