Partial code cleanup, send index and total with every slice.