Small fixes, wip on analyze_sim