Changing to read settings from xml file