flake8 and documentation for simulator.