Moves text-related functions into textUtil