text_properties code cleanup - pregame for #2504