DB rewrite and prep for CompoundTask batching