Refactoring

Created a new method to fetch the settings