cleanup in Simulation and itegration to GUI