Settings, refactor ,UI