Redone the XML loading compleately.
It now supports validation against XSDs and stuff. Also the interface is
a lot easier to use and maintain.
Also removed a lot of useless/redundant/stale code.