Refactor settings package