Refactor phone confirmation mechanism.