Improvements and fixes to field text handling

Removed some more instances of 16-bit counters being used for string lengths.