Start of code to support text format.