Adding better support for background agents.