Attempt at sockets/threading