Using AgentSender class for handling messages to the Agent from the Worker
Seperated Agent and TestController logic
Updated based on PR comments