Bug fixes. Added Disconnect functionality.