Added disconnect event. Added better example code.