Refactored stuff out of XmlConfiguration