Revert "switch to using __hex__ and __index__"

This reverts commit 9ec72683f7514e1542c8e441adb817b40226c013.