Hanlde simulation started, stopped, paused states. Save states to db