WebRTC example, refactoring step 1