Cleanup and Agent class.

A little cleanup and the base class for Agents.
A type of Agent and code to use it.

Some more code for Agent, a new class: AgentWorker, which carries
workers, and some of the code to use it.