General cleanup, Add keepAlive and auto reconnect