Cleaned up agent v2