Almost done refcatoring ibdint.py