Refactor settings into a package