Further improvements to generated text output for Statetypes/Instances