loxi_ir: two fixes
diff --git a/loxi_globals.py b/loxi_globals.py
index 93b24b5..e8b21bd 100644
--- a/loxi_globals.py
+++ b/loxi_globals.py
@@ -26,6 +26,7 @@
 # under the EPL.
 
 from loxi_ir import *
+from collections import OrderedDict
 
 #######################################################################
 ### OFVersion registry
@@ -69,4 +70,4 @@
 #######################################################################
 
 # map OFVersion -> OFProtocol
-ir = {}
+ir = OrderedDict()
diff --git a/loxi_ir/unified.py b/loxi_ir/unified.py
index d481730..7bcdd83 100644
--- a/loxi_ir/unified.py
+++ b/loxi_ir/unified.py
@@ -153,3 +153,4 @@
     unified = ir.OFProtocol(version=None, classes = tuple(unified_classes.values()), enums=unified_enums)
     for e in chain(unified.classes, unified.enums):
         e.protocol = unified
+    return unified