Fixes and enhancements (including IP address retrieved from agent
config).