refactor settings page