Code cleanup for op_handler.