Small changes following rebase to quantity-speedup