Simulation refactoring