Added testing platform (testbed2.py) and added fixes to decode_xml
method.