sonar_thread & Server

Well, this isnt the right way to do it. Need to clean up the code a bit.