Fixed some connection issues, can succesfully get and parse JSON and open a socket to a port