cleanup client profile code