Small duplication refactor on token generator methods