Refactor Command.
Refactor Agents to use Chain of Responsibility pattern.