Changed parsing functions to return a dictionary of XML processing instructions rather than just the version.
Fixed a few parsing bugs