changed Object-Creation-Pattern to Closures for peer.js