refactor Registry setting implementation