refactor settings initialisation