some more refactoring of the text/heading reconfiguration code.