code cleanup in analyze simulation run and new graphics