Small refactoring & XmlExtensions