Udated the refresh method, made changes so that the config file is read correctly. And refresh method is dependant on the config file.
Updated the Sanitize method to work correctly.