Upgrade text.py based on dino changes