Some cleanup.
Get rid duplicate client phase1, and other cleanup.