Hardening/more cpp xmls to separate file 02

### Description
Just moves a whole bunch of XML and JSON code from within cpp files to separate files.
Added a few unite test cases while I were at it.