Made keepAlive interval configurable in connect
Removed everything apart from connect