pep8 fixes to simulation.py