Addition of Unit tests

the majority of the lines that are not covered are in load xml. I could
not write successful unit tests for this. Should have been written
before.