tried to resolve some namespace clashes and add xs:ID attributes where necessary.