Refactor token configuration