Added connection tests
Added license
Coding style cleanup
Added tests for connection disconnected->connected
Implemented sending messages after handler check_ok