Finished bitia testing

Voodoo-tested bitia and fixed several errors. It now seems to be
working.
Python 3 compatibility issues