Refactor settings rendering