Cleaning: rename output_state to exit_state.