Merge pull request #32 from IATI/refactor

Refactor some of the code, and switch to DOMDocument for validation