test_text: Update, cleanup

Cleaned up code to follow standards.