Optimize code structure

Move *Ticket() to TokenManager.