Refactor update settings