Revert reconnect branch

Extensive review has shown that the previous patch was faulty, this reverts all of it in one go. We are still seeking a better solution to the underly problem.