Refactored XmlParser class along with Main thread to make XmlParser take care of getting the values needed from the xml file.