Cleanup agent to use enabled flag everywhere
Still allow nil to enable logging