refactor settings window