allow config to drive num_operations.

re-org some variables. fix up tests.