removing unnecessary tests and adjustments for pep8