Tests of getting subsequent simulation_runs and some code refactoring