Adding tails to agents and cleaning up.