Better support for deletion of agents, trying to cleanup most "loose" ends.