Refactor settings upgrader.