Refactored _get_text to return a list of Text objects to be more consistent with the _get_code function.