Adding socket.io, adjusting sendCommand

Preperations to add socket.io support
adjusting for the changing api on the spark side of things