Reintegration

Commits from integration branch without agent/worker communication refactoring and tests
The way it works now, the commands end up being queued and processed in order on the same thread. It's not a race condition, but there is still the possibility of trying to start tests without any connections