Switched the functionalities of end/pauseSimulation() in MainController