Refactor Token class