Optimized the tokenizer to return entities instead of plain string tokens