WIP Auto reconnection

Creating a PR so that it's possible to do code comments easily.