Settings refactor