Refactoring of loadSettings() method