Added affinity parameter

Also a minor tweak to the definition of "execution agent"