sample_store: Rework sample index calculation
Move comment
sample_store: Fix comment