Added health to server-side agents and refactored agents a bit.