Lots of attempts at getting a connection working