Code Tidy Up + Phrase Completion Fix

Code Tidy Up + Phrase Completion Fix