Move task queue to dedicated module
Add tests for default client
Better connection closing handle