Added result_to_h method.