Added TextFormat code (untested).