Added sockets design an some threading