Reintegration

Commits from integration branch without agent/worker communication refactoring and tests
At some point we will probably want to go to something where we specify the target number of connections and have the worker figure out how to get from where it is to the target.