Adding XmlMetaDataBuilder. Fixing some smaller bugs.