all the work for webrtc phones
Cleanup and standardization