Refactor token type, incorporating Kha's suggestions