Small refactoring of compute_hazard_curves