Split text manglers into functions

Signed-off-by: Don Beagam <don@comdotdon.com>