Do not use iteritems since is not Python3 compliant.
Ensure total ordering for the BitHandler class.