WIP: add saveState to BABCcxx
WIP: fix one compiler error
WIP: fix a compiler error in xml file