Refactorings + tests sockets Clementine