First commit of the web service and thread managment