added code style fixes to conform with PEP8