Added stack.disconnect method to disconnect stack clients.
Added unit tests (some incomplete)