Parsing frame done right. Text-related stuff move to text_utils.js