Created AgentManager, other cleanups