Connect/disconnect buttons + some bugfixes.