Refactor socket.io instantiation to its own factory.  Closes #15