Trim whitespace.
Fix failing test and remove pointless clearInterval().
Split up bot config and add tests.

Add some tests around event emitter bindings and keepalive config.
connection it not always set initially but is after connection.