[simulations] Refactoring code

6 jobs for master in 3 minutes and 47 seconds