Remove unused variable and function
Fix multiple sockets issue
Disable log messages