Rename variables and adjusting tests.py and bdtoxml.py