Refactor, changing secrets to settings.