Engine: Engine: Split simulation into multiple functions