Added debug for outgoing messages.
Added pong.
Turned spaces into tabs
Fixed timeout in interval, cleared interval on close and error