Connection errors

This has been going on for long enough. Some todos still annoyingly clear, but it stops a lot of errors I'm seeing myself, so lets merge this into develop, and see if we can work towards some sort of new beta release.