Minor refactoring of Simulator