Added 'close()' and 'disconnect()' methods.