Use socket on global scope
Build websocket version separately
Added a disconnect function to the adapter which runs before app reset
Dist