Fix some bugs, move all webRTC functions into WebRTC object
Fix merge conflict