fixed a lot of loose ends on the xml builder