diff -u lib/mobi_header.py lib_new/mobi_header.py
--- lib/mobi_header.py	Sat Oct 25 21:23:14 2014
+++ lib_new/mobi_header.py	Sat Oct 25 20:34:06 2014
@@ -3,6 +3,10 @@
 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
 
 from __future__ import unicode_literals, division, absolute_import, print_function
+try:
+    from collections import OrderedDict as dict
+except ImportError:
+    pass
 
 from compatibility_utils import PY2, unicode_str, hexlify, bord
 
@@ -466,7 +470,7 @@
         self.fdst = 0xffffffff
         self.mlstart = self.sect.loadSection(self.start+1)[:4]
         self.rawSize = 0
-        self.metadata = {}
+        self.metadata = dict()
 
         # set up for decompression/unpacking
         self.compression, = struct.unpack_from(b'>H', self.header, 0x0)
@@ -628,7 +632,7 @@
         # but we will treat it as such
         # so section 0 is 16 (decimal) + self.length in total == at least 0x108 bytes for Mobi 8 headers
         print("Dumping section %d, Mobipocket Header version: %d, total length %d" % (self.start,self.version, self.length+16))
-        self.hdr = {}
+        self.hdr = dict()
         # set it up for the proper header version
         if self.version == 0:
             self.mobi_header = MobiHeader.palmdoc_header
diff -u lib/mobi_k8resc.py lib_new/mobi_k8resc.py
--- lib/mobi_k8resc.py	Sat Oct 25 21:23:14 2014
+++ lib_new/mobi_k8resc.py	Sat Oct 25 21:05:31 2014
@@ -3,6 +3,10 @@
 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
 
 from __future__ import unicode_literals, division, absolute_import, print_function
+try:
+    from collections import OrderedDict as dict
+except ImportError:
+    pass
 
 from compatibility_utils import unicode_str
 
@@ -19,9 +23,9 @@
         self.opos = 0
         self.extrameta = []
         self.cover_name = None
-        self.spine_idrefs = {}
+        self.spine_idrefs = dict()
         self.spine_order = []
-        self.spine_pageattributes = {}
+        self.spine_pageattributes = dict()
         self.spine_ppd = None
         # need3 indicate the book has fields which require epub3.
         # but the estimation of the source epub version from the fields is difficult.
@@ -58,7 +62,7 @@
     def prepend_to_spine(self, key, idref, linear, properties):
         self.spine_order = [key] + self.spine_order
         self.spine_idrefs[key] = idref
-        attributes = {}
+        attributes = dict()
         if linear is not None:
             attributes['linear'] = linear
         if properties is not None:
@@ -169,7 +173,7 @@
         p = 1
         tname = None
         ttype = None
-        tattr = {}
+        tattr = dict()
         while s[p:p+1] == ' ' :
             p += 1
         if s[p:p+1] == '/':
diff -u lib/mobi_opf.py lib_new/mobi_opf.py
--- lib/mobi_opf.py	Sat Oct 25 21:24:18 2014
+++ lib_new/mobi_opf.py	Sat Oct 25 20:50:44 2014
@@ -3,6 +3,10 @@
 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
 
 from __future__ import unicode_literals, division, absolute_import, print_function
+try:
+    from collections import OrderedDict as dict
+except ImportError:
+    pass
 
 from compatibility_utils import unicode_str, unescapeit
 from compatibility_utils import lzip
@@ -71,7 +75,7 @@
         if self.k8resc is not None and self.k8resc.cover_name is not None:
             # update cover id info from RESC if available
             self.cover_id = self.k8resc.cover_name
-        self.h = HTMLParser()
+        #self.h = HTMLParser()  # FIXED
         # Create a unique urn uuid
         self.BookId = unicode_str(str(uuid.uuid4()))
         self.pagemap = pagemapxml
@@ -93,13 +97,13 @@
             self.target_epubver = '2'
 
         # id for rifine attributes
-        self.title_id = {}
-        self.creator_id = {}
-        self.publisher_id = {}
+        self.title_id = dict()
+        self.creator_id = dict()
+        self.publisher_id = dict()
         # extra attributes
-        self.title_attrib = {}
-        self.creator_attrib = {}
-        self.publisher_attrib = {}
+        self.title_attrib = dict()
+        self.creator_attrib = dict()
+        self.publisher_attrib = dict()
         self.extra_attributes = []  # for force epub2 option
         # Create epub3 metadata from EXTH.
         self.exth_solved_refines_metadata = []
@@ -146,15 +150,13 @@
                                                 'Watermark', 'Clipping Limit', 'Publisher Limit', 'Text to Speech Disabled', 'CDE Type',
                                                 'Updated Title', 'Font Signature (hex)', 'Tamper Proof Keys (hex)',]
 
-        # def handleTag(data, metadata, key, tag, ids={}):
-        def handleTag(data, metadata, key, tag, attrib={}):
+        def handleTag(data, metadata, key, tag, attrib=dict()):
             '''Format metadata values.
 
             @param data: List of formatted metadata entries.
             @param metadata: The metadata dictionary.
             @param key: The key of the metadata value to handle.
             @param tag: The opf tag corresponds to the metadata value.
-            ###@param ids: The ids in tags for refines property of epub3.
             @param attrib: The extra attibute for refines or opf prefixs.
            '''
             if key in metadata:
