Improve style of worker.py so it conforms to pep8