Adding real sockets for exchanging messages

Added a directory for core extension
Extended struct for a proper to_json

The different thread now talk each other with json
and through threads.