Added some comments to explain what callback functions get called when.
Added libraries necesarry to parse JSON and websockets.