In preparation for turning them into functions. To reduce the scope of Agent, and refactor how Agent is created and started.