Move simulation into Simulator class. (Fix #2)

Centralize the simulation work while keeping a clean main.
Allow refresh step by step from the open loop.