Adjusted code to pass the py.test PEP8 tests