Work dont to use parrel db connection
Move socket use from worker thread to main thread, some refactoring,
remove of unused code