Cleaned up Phrase Convert Code

optimized the convertPhrase code.