Refactor settings usage