Simulator refactoring