Rewrote the initilization code for the Text function/object