Simplify result_format logic