Refactored happyToken with design patterns in mind