Updated new peerjs, refactor with new API set